Posted to trash by kostix at Wed Feb 04 17:13:12 GMT 2009view raw

  1. [03:40] kostix ok, the question: when we implemented raising tkabber from a tray icon, it seemed to misbehave under metacity and kwin (IIRC). today I've been shown this bugreport regarding raising Tk windows under metacity: http://bugzilla.gnome.org/show_bug.cgi?id=567528 -- it states that instead of XRaiseWindow a well-behaving app should set some property (?) somewhere. what do you think about this?
  2. [03:40] kostix some _NET_ACTIVE_WINDOW messages
  3. [03:40] jenglish kostix -- I think this is a known issue.
  4. [03:40] kostix Tk really uses XRaiseWindow and it's documentation sounds ok to me
  5. [03:40] * jenglish downloading ...
  6. [03:41] jenglish ... part 1 of the known issue is that X clients don't get to say "raise this window" -- they just get to say "Dear WM, please if you would be so kind, raise this window for me."
  7. [03:43] jenglish (That's *always* been the case, since the dawn of the ICCCM. Nobody noticed until recently, 'cause up til now WMs have always complied with those requests.)
  8. [03:46] jenglish ... looks like this is not really a bug. Comment #9 from HP is correct.
  9. [03:47] kostix jenglish: but it clearly states "you should file a bug..." -- how do you interpret that?
  10. [03:47] kostix or it just means "either way is ok if it's properly documented"?
  11. [03:48] jenglish Quoth HP: "If they have an API meaning "bring this window to user's attention" and they
  12. use XRaiseWindow() to mean that, then yes, you should file a bug with them."
  13. [03:49] jenglish Tk doesn't have an API meaning "bring this window to user's attention."
  14. [03:49] jenglish It has [raise], which means "Please dear WM bring this window to the top of the stacking order if it's not too much of a bother..."
  15. [03:49] kostix I'm not sure any windowing system has such api
  16. [03:50] kostix well, ok
  17. [03:50] kostix jenglish: how "bring to the user attention" would be different then? say, flash a window's frame without moving it from its layer?
  18. [03:53] jenglish "bring to the user's attention" is a fairly recent invention (circa 2002?). Tk just hasn't caught up yet.
  19. [03:53] kostix probably a whole package called "freedesktop" is needed...
  20. [03:54] jenglish Note that Windows XP and later has similar issues.
  21. [03:54] patthoyts On windows it occurs as a side-effect of [raise]
  22. [03:54] kostix eh? I know about FlashWindow(), is it this?
  23. [03:54] patthoyts yeah
  24. [03:54] kostix thanks
  25. [03:55] patthoyts Although its called through SetForegroundWindow
  26. [03:55] patthoyts If your app isn't foreground then the wm will not let it raise tot he top but calls FlashWindow instead.
  27. [03:55] jenglish That's what happens under metacity and kwin, too.
  28. [03:56] * jenglish in the case of kwin, it depends on user preferences, of course.
  29. [03:56] kostix well, this might have sense
  30. [03:57] kostix but the modal dialog box anyway pops the window in front of me in windows, IIRC
  31. [04:00] patthoyts Not for me. If I do [after 2000 [list raise .]] and swith to firefox, it doesnt let tkchat raise over firefox.
  32. [04:00] patthoyts We had a discussion about this here a few days ago. There is evidently some setting in windows that disables this as having a flashing taskbar item for this is normal on XP but some people dont get that.
  33. [04:01] kostix hm, I'm sure I had cursed this behaviour under certain circumstances
  34. [04:01] kostix may be another window of a currently active app?
  35. [04:01] jenglish That's how current X WMs do it too.
  36. [04:04] jenglish Wait, kostix -- this bug report pertains to tkabber? A chat/IM client?
  37. [04:04] jenglish Please, I beg you: stop trying to do whatever it is you're trying to do.
  38. [04:05] kostix jenglish: that concrete bug I showed? no. but it was brought to my attention because of this
  39. [04:05] jenglish This whole _NET_WM_DEMANDS_ATTENTION / flashing taskbar / [raise] doesn't work anymore thing is part of an ever-escalating war between window managers and applications.
  40. [04:06] kostix jenglish: the idea was to unconditionally bring tkabber's window to front on a left mouse-button click on the tray icon. on some WMs it didn't work well
  41. [04:06] jenglish Exactly.
  42. [04:06] kostix "the old ones" like fvwm did OK
  43. [04:08] jenglish Newer WMs don't let you do that any more.
  44. [04:08] jenglish And the harder you try, the more they will fight back.
  45. [04:08] kostix jenglish: but my case is clear "bring that bloody window up, I say" thing
  46. [04:09] jenglish As soon as you find some way to "just make this window do what I want it to do", Lubos will find a way to defeat you next year.
  47. [04:09] jenglish EXACTLY! You, as an application, should NOT be saying "bring that bloody window up."
  48. [04:09] kostix well, ok. where I can buy vista?
  49. [04:09] jenglish You, as an application, get to say "Please dear WM bring this window to the user's attention."
  50. [04:10] jenglish If the WM chooses not to comply, and instead just flashes the taskbar, LEAVE IT AT THAT. That's what the user has decided he wants.
  51. [04:10] kostix jenglish: what about me being the user? I can understand this "polite" thing, it's probably good in terms of HID guidelines but when I click the tray icon I'm making a conscious gesture, right?
  52. [04:11] jenglish If you, as a user, don't like that behavior, change your WM settings. Or use a different WM.
  53. [04:12] jenglish If you, as a program author, don't like that behavior, STOP FIGHTING IT. Because Lubos will always win in the end.
  54. [04:16] kostix ok, thanks jenglish
  55. [04:16] kostix you brought some philosophic mood on me
  56. [04:17] jenglish In the meantime, Tk really ought to support _NET_WM_DEMANDS_ATTENTION. There's an FR open for that, undealt with to date.
  57. [04:18] kostix DEMANDS_ATTENTION? let's implement _NET_WM_TK_RULEZ instead!
  58. [04:21] stu Lubos ?
  59. [04:21] jenglish Lubos Lunak. Author of KWIN, the KDE window manager.
  60. [04:21] stu thanks
  61. [04:22] jenglish Inventor of "focus-stealing prevention" mechanisms and _NET_WM_DEMANDS_ATTENTION.
  62.