GNOME Bugzilla – Bug 691515
Insufficient checks for EWMH support
Last modified: 2013-01-18 02:13:54 UTC
Created attachment 233200 [details] [review] patch to add missing checks There were a few places where EWMH hints were used without checking that the current window manager supports the hint. A property may have a value set by a previous window manager and thus does not match the state of the current window manager. On my system, this led to the problems of bug 683333 and bug 689030. There was a _NET_WORKAREA property on the root window, but it was from the metacity that gdm was running, not from my window manager (xmonad). The attached patch guards the use of _NET_CURRENT_DESKTOP, _NET_WORKAREA, _NET_CURRENT_DESKTOP, _NET_FRAME_EXTENTS, and _NET_VIRTUAL_ROOTS. Before this patch goes in, someone should probably verify that common window managers include these hints in _NET_SUPPORTED if they do indeed support them.
Review of attachment 233200 [details] [review]: Makes sense
This should get backported to the 3.4 and 3.6 branches too.
Oh, and 3.0 and 3.2, but they only need the gdkwindow fixes (the problematic gdkscreen functions aren't in these versions)
In the Debian bug tracking system bug report #681974 [1] describes this problem. [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=681974
Geoff, […] display = GDK_DISPLAY_XDISPLAY (gdk_screen_get_display (screen)); disp_screen = GDK_SCREEN_XNUMBER (screen); workarea = XInternAtom (display, "_NET_WORKAREA", True); /* Defaults in case of error */ area->x = 0; area->y = 0; area->width = gdk_screen_get_width (screen); area->height = gdk_screen_get_height (screen); if (!gdk_x11_screen_supports_net_wm_hint (screen, gdk_atom_intern_static_string ("_NET_WORKAREA"))) return; if (workarea == None) return; […] 1. Why is your check not added before the following line? workarea = XInternAtom (display, "_NET_WORKAREA", True); 2. Why was the check `workarea == None` not enough? Should `XInternAtom (display, "_NET_WORKAREA", True);` be called with `False`? Reading the documentation [1] I am not sure what happens, if the workarea does not exist and `True` is passed. [1] http://www.tronche.com/gui/x/xlib/window-information/XInternAtom.html
Paul, feel free to commit this on the 3.4 branch.
cherry-picked to both 3.6 and 3.4