BUG.txt 1.9 KB

123456789101112131415161718192021222324252627282930313233343536
  1. FIXME: There is a really annoying bug, seems to be an interaction
  2. between gtk and windowmaker's docking mechanism. To reproduce:
  3. - Start wmcliphist normally
  4. - Place wmcliphist in the dock (if not already there)
  5. - Right-click wmcliphist dock icon, select "Exit"
  6. - From a terminal, run "wmcliphist -c notacolor" (any unknown color
  7. string), or "wmcliphist -b nosuchbuffer". Basically anything that
  8. causes wmcliphist to pop up a warning dialog on startup.
  9. - Click "OK" in the warning dialog.
  10. - Now, wmcliphist is running, but it has failed dock. It's
  11. running in an icon (like an un-docked dockapp)... and in the dock,
  12. there is a blank icon where wmcliphist should be. Attempting to
  13. drag the wmcliphist icon to the blank icon won't work (though you
  14. can dock it in another empty dock position).
  15. I tried various things to fix this (rewrote show_message() to use
  16. gtk_dialog_new_with_buttons(), added a sleep(1) before showing the
  17. dialog, call gtk_main_iteration() before popping up the dialog), but
  18. none of it helped. Fixing this might require a patch to WindowMaker
  19. itself...? Anyone interested in fixing this should have a look at
  20. foo_create_main_icon_window() in wmcliphist.c. If you don't understand
  21. what's going on there (and I admit I don't), you probably have little
  22. chance of fixing this bug...
  23. One approach I can think of: The trouble seems to be caused by calling
  24. show_message() before gtk_main() has been called. If show_message()
  25. gets called later (after the app has been docked), all is well. So for
  26. startup warnings, we could use g_timeout_add() to display the warnings
  27. later. Unfortunately one of these ("Some items from history will be
  28. lost") isn't a warning with just an OK button, it's a Yes/No question,
  29. and by the time gtk_main() is running, it's too late for the No answer.
  30. Turning that into a "Some items from history were lost. [OK]" kinda
  31. violates the author's intent (he wanted to make sure no data was lost
  32. by accident).