/* Whether the given window is:
- the real root window;
- - the virtual root window;
- a direct child of the root window;
- a direct child of the window manager's decorations.
*/
{
Display *dpy = DisplayOfScreen (screen);
Window root, parent, *kids;
- Window vroot = VirtualRootWindowOfScreen(screen);
unsigned int nkids;
- if (window == vroot)
- return True;
-
if (!XQueryTree (dpy, window, &root, &parent, &kids, &nkids))
return False;
if (window == root)
return True;
- /* If our direct parent is the root (or *a* root), then yes. */
- if (parent == root || parent == vroot)
+ /* If our direct parent is the real root window, then yes. */
+ if (parent == root)
return True;
else
{
}
-
static Bool error_handler_hit_p = False;
static XErrorHandler old_ehandler = 0;
static int
{
int i;
Display *dpy = DisplayOfScreen (screen);
- Window vroot, real_root;
+ Window real_root;
Window parent, *kids = 0;
unsigned int nkids = 0;
old_ehandler = XSetErrorHandler (BadWindow_ehandler);
error_handler_hit_p = False;
- vroot = VirtualRootWindowOfScreen (screen);
- if (XQueryTree (dpy, vroot, &real_root, &parent, &kids, &nkids))
+ real_root = XRootWindowOfScreen (screen); /* not vroot */
+ if (XQueryTree (dpy, real_root, &real_root, &parent, &kids, &nkids))
for (i = 0; i < nkids; i++)
{
XWindowAttributes xgwa;