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 /clientwin.h | |
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 'clientwin.h')
-rw-r--r-- | clientwin.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/clientwin.h b/clientwin.h new file mode 100644 index 0000000..9fc59b5 --- /dev/null +++ b/clientwin.h @@ -0,0 +1,29 @@ +/* + * Copyright 2007 Kim woelders + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that copyright + * notice and this permission notice appear in supporting documentation, and + * that the name of the copyright holders not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. The copyright holders make no representations + * about the suitability of this software for any purpose. It is provided "as + * is" without express or implied warranty. + * + * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THIS SOFTWARE. + */ +#ifndef _CLIENTWIN_H_ +#define _CLIENTWIN_H_ + +#include <X11/Xlib.h> + +extern Window Find_Client(Display * dpy, Window root, Window target_win); + +#endif |