GNOME Bugzilla – Bug 435028
WM_CLIENT_LEADER is wrong on the leader_window
Last modified: 2007-05-02 00:21:23 UTC
The gtk client/group leader window has a WM_CLIENT_LEADER of 0x0. (The ICCCM says "The client leader window must have a WM_CLIENT_LEADER property containing its own window ID (i.e. the client leader window is pointing to itself).") It gets set to 0 in gtk because gdkwindow-x11.c:setup_toplevel_window() always sets it from the GdkDisplayX11's leader_window field, which obviously hasn't been set yet at the time the leader window is being created. Attached patch fixes it by making setup_toplevel_window() know that if leader_window hasn't been set yet, then that must mean the window being created is going to be the leader window, and so it sets WM_CLIENT_LEADER accordingly. I'm not aware of anything breaking because of this, it's just something I noticed.
Created attachment 87365 [details] [review] patch to fix WM_CLIENT_LEADER on WM_CLIENT_LEADER
Looks fine, thanks for noticing. Please commit to gtk-2-10 and trunk.
* gdk/x11/gdkwindow-x11.c (setup_toplevel_window): Make sure the leader_window's WM_CLIENT_LEADER points to itself. #435028 btw gtk-2-10 is broken at the moment (it seems to only have half of the gtkiconcachevalidator commit)