topmost windows

Deron Johnson Deron.Johnson at Sun.COM
Thu Jan 5 15:47:34 PST 2006


More on topmost windows.

In this response to Keith, I ask some implementation questions and
I raise the issue of how multiple topmost windows (and the screen
saver window) behave in the window stack. I propose that one way
to deal with this is to make MapWindow be equivalent to MapRaised
for the screen saver and topmost windows.

(Effectively, the screen saver window is just a topmost window
which has been created by the server).

Deron Johnson wrote On 01/05/06 11:30,:
> 
>> 3)	Are not subject to the RedirectSubwindows request on
>>	the parent in the Composite extension.
> 
> 
> How is this currently accomplished for saver windows? I can see the
> skipping in QueryTree is accomplished but I don't see any code in
> compRedirectSubwindows which skips saver windows.
> 
> 
>>With this, I suggest we steal one of the remaining bits in the WindowRec
>>as a boolean indicating always-on-top status.
> 
> 
> Where can we steal the bit from?
> 
> 
>>I'm not sure we need to restrict ourselves to a single such window; the
>>semantics of each operation seem clear enough, and we will have to
>>continue to support the existing screen saver window in any case.
> 
> 
> Yes. I would like the ability to run the screen saver in LG.
> So we should support multiple topmost windows. But what should be
> the semantics of how the topmost windows are stacked? Should we say
> that the most recently mapped window is the very topmost?  This would
> mean that performing a MapWindow does an implicit MapRaised.
> 
> 
>>Are you averse to calling these windows 'topmost'? That's the Windows
>>term and if we permit more than one will make things less arbitrarily
>>confusing.
> 
> 
> Sounds good to me.
> 
> 
>>That gives us:
>>
>>typedef struct {
>>    Bool topmost;
>>} XFixesExtendedWindowAttributes;
>>
>>void
>>XFixesChangeWindowExtendedAttributes (Display *dpy, Window win,
>>                                      unsigned long valuemask,
>>                                      XFixesExtendedWindowAttributes *attr);
>>
>>Status
>>XFixesGetWindowExtendedAttributes (Display *dpy, Window win,
>>                                   int major_version, int minor_version,
>>                                   XFixesExtendedWindowAttributes *attr);
>>
>>Status
>>XFixesQueryTree (Display *dpy, Window win, Window *root, Window *parent,
>>                 XFixesWindowAndTopmost *children, int *nchildren);
> 
> 
> Looks like a good start.
> 
> 
>>Adding 'topmost' support to DIX will largely involve fixing the existing
>>screen saver code to use this attribute. I suspect that will end up with
>>an overall reduction in the amount of code necessary to handle this
>>case.
> 
> 
> What other changes are needed besides changing window.c:RealChildHead to
> check the stolen bit in WindowRec?
> 
> Would you be willing to implement this extension? You are much more
> familiar with the screen saver code than I.
> 
> I am very much in favor of this approach. It sounds like it will clean
> up some of the hacks I've had to put in.
> 



More information about the xorg-arch mailing list