diff options
author | Kim Woelders <kim@woelders.dk> | 2007-12-06 05:30:43 -0500 |
---|---|---|
committer | James Cloos <cloos@jhcloos.com> | 2007-12-06 05:30:43 -0500 |
commit | e09956f244099ddd36b1a2cd5d7800d5fc7120c1 (patch) | |
tree | c5480b5f26a7e0bf04ff79db03b400f57bebeb97 /xprop.c | |
parent | 9ccda86dae06375750685977a81f4fb1cabf3d00 (diff) |
Select correct client window in WM’s using virtual roots
From bug 2185¹
When manually selecting a window, xprop finds the top-level window containing
the pointer and uses XmuClientWindow to attempt to find a client window having
WM_STATE set.
In a WM using virtual roots (e.g. enlightenment, desks other than first) this
fails beacuse the top-level window is a virtual root, and XmuClientWindow seems
to find the first client having WM_STATE set, which only by coincidence will be
the one the user intended to select (i.e. containing the pointer).
The solution is to descend the window hierarchy at the pointer location to find
a window with WM_STATE set.
1] https://bugs.freedesktop.org/show_bug.cgi?id=2185
Signed-off-by: James Cloos <cloos@jhcloos.com>
Diffstat (limited to 'xprop.c')
-rw-r--r-- | xprop.c | 16 |
1 files changed, 2 insertions, 14 deletions
@@ -51,7 +51,6 @@ from The Open Group. #endif #include <X11/Xatom.h> -#include <X11/Xmu/WinUtil.h> #include "dsimple.h" @@ -1702,19 +1701,8 @@ main (int argc, char **argv) if ((remove_props != NULL || set_props != NULL) && argc > 0) usage(); - if (target_win == None) { - target_win = Select_Window(dpy); - if (target_win != None && !frame_only) { - Window root; - int dummyi; - unsigned int dummy; - - if (XGetGeometry (dpy, target_win, &root, &dummyi, &dummyi, - &dummy, &dummy, &dummy, &dummy) - && target_win != root) - target_win = XmuClientWindow (dpy, target_win); - } - } + if (target_win == None) + target_win = Select_Window(dpy, !frame_only); if (remove_props != NULL) { int count; |