Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!uunet!munnari.oz.au!metro!usage.csd.unsw.oz.au!decus!taylort From: taylort@decus.com.au (Trevor Taylor) Newsgroups: comp.windows.x Subject: Re: root-window (DECwindows) Message-ID: <9497.27e527af@decus.com.au> Date: 18 Mar 91 10:48:47 GMT References: <9103081840.AA09751@mijen.inel.gov> <21241@memqa.uucp> Organization: DECUS, South Pacific Chapter Lines: 33 In article <21241@memqa.uucp>, qfhca81@memqa.uucp (Henry Melton) writes: > In article <9103081840.AA09751@mijen.inel.gov>, dob@inel.GOV (Dave Brooks) writes: >> a "pseudo-root" or virtual root window. the method used in vroot.h is to >> 1) get the children of the root window and 2) check each to see if they >> contain a certain property, the presence of which marks it as the >> pseudo-root (in your context). >> > I tried this, but could find nothing distinctive about the other windows > that the dec window manager creates. But, with a little careless trial > and error, I found that by hardcoding in 0x800012 for the value of root > window in xv, I could get quite nice root window pictures under > Dec Windows. I haven't checked it extensively for side-effects, and there > probably are some, but at least it worked on all the ncd terminals running > DecWindows in our area. You are correct that there is no special property under DECwindows, however I use a slightly different scheme: 1. Get the children of the root 2. Check for a window of exactly the same size as the root (and at 0,0 I think). Use the last one you find like this. In this way, even it there is no pseudo-root, the real root is returned and there are no side-effects. This is not to say that the selected window is the pseudo-root either, but it always bas been to date :-) /*--------------------------------------------------------------------*/ /* Trevor Taylor E-Mail: TaylorT@decus.com.au */ /* P.O. Box 155 T.Taylor@praxa.com.au */ /* Aspley 4034 Phone: +(61) 7 369-8100 */ /* Australia Fax: +(61) 7 369-0722 */ /*--------------------------------------------------------------------*/