Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!ncar!boulder!stan!ninja!toml From: toml@ninja.Solbourne.COM (Tom LaStrange) Newsgroups: comp.windows.x Subject: Re: DECW$WINMGR Weirdness Message-ID: <1990Jun27.215144.15621@Solbourne.COM> Date: 27 Jun 90 21:51:44 GMT References: <1376@shodha.dec.com> Sender: news@Solbourne.COM Reply-To: toml@solbourne.com Organization: Solbourne Computer, Inc. Lines: 108 |> -The problem is that the DEC window manager places a full-screen, |> -pseudo-root window over the real root window. This pseudo-root window |> -has background set to ParentRelative, but it doesn't automatically |> -change when xsetroot changes the real root window's background. |> |> There is another solution. You could check for the existence of the DEC |> window manager psuedo-root and then use it in your programs. What follows |> is an Ada procedure that will 'look' for this window. |> This problem also exists for swm users when the Virtual Desktop is enabled. With our next release (very soon now), you will find a C fragment in /usr/lib/X11/swm/vdt.c that will return the actual root window or the Virtual Desktop window if swm is running and the vdt is enabled. For you swm users out there now, I'm including that code fragment here. It's easy to just plug this into xphoon, xsetroot, or any other root window display program and have it do the right thing. -- Tom LaStrange Solbourne Computer Inc. ARPA: toml@Solbourne.COM 1900 Pike Rd. UUCP: ...!{boulder,sun}!stan!toml Longmont, CO 80501 --------------------- vdt.c --------------------------- /*********************************************************************** * * Solbourne Computer, Inc. * Copyright (c) 1990, Solbourne Computer, Inc. USA * All rights reserved. * * vdt.c * * Find the Virtual Desktop window * * 08-Feb-90 Thomas E. LaStrange File created * ***********************************************************************/ #include #include #include /*********************************************************************** * * Procedure: * FindVirtualDesktop * * Arguments: * dpy - Display pointer * * Returns: * Window - the Virtual Desktop window or the actual root window * * Function: * This routine will look for the swm Virtual Desktop window. If * it is not there, the actual root window is returned. * *********************************************************************** */ #ifndef NULL #define NULL 0 #endif Window FindVirtualDesktop(dpy) Display *dpy; { Window root; /* the returned root window */ Window rootReturn; Window parentReturn; Window *children; unsigned int numChildren; int i; Atom __SWM_VROOT; /* get the default root window */ root = RootWindow(dpy, DefaultScreen(dpy)); /* go look for a virtual desktop */ __SWM_VROOT = XInternAtom(dpy, "__SWM_VROOT", False); children = NULL; XQueryTree(dpy, root, &rootReturn, &parentReturn, &children, &numChildren); for (i = 0; i < numChildren; i++) { Atom actual_type; int actual_format; long nitems, bytesafter; Window *newRoot = NULL; if (XGetWindowProperty (dpy, children[i], __SWM_VROOT,0,1, False, XA_WINDOW, &actual_type, &actual_format, &nitems, &bytesafter, (unsigned char **) &newRoot) == Success && newRoot) { root = *newRoot; break; } } if (children) XFree(children); return (root); }