topmost windows

Deron Johnson Deron.Johnson at Sun.COM
Thu Jan 5 15:44:13 PST 2006


More on topmost windows.

In this mail, Keith starts to define the semantics of how
topmost windows behave. And proposes some additions to
XFIXES to support topmost windows.

Keith Packard wrote On 01/04/06 20:44,:
> On Wed, 2006-01-04 at 17:34 -0800, Deron Johnson wrote:
> 
> 
>>There are so many advantages to the always-on-top window and it
>>solves so many other problems I think we should try to perserve
>>and see if we can make it happen. Plus, it seems like a good,
>>generalized concept.
> 
> 
> I like the semantics of the always-on-top window better than the
> not-clip-by-siblings, even if it does produce a 'magic' window.
> 
> I suggest we follow the semantics of the existing screen saver window:
> 
>  1)	Appears inside the server as regular windows.
>  2)	Is not reported to other clients in QueryTree
>  3)	Are not subject to the RedirectSubwindows request on
> 	the parent in the Composite extension. This eliminates
> 	extra Composite magic. I think this can be justified
> 	as these windows don't appear in the 'normal' QueryTree list.
> 
> With this, I suggest we steal one of the remaining bits in the WindowRec
> as a boolean indicating always-on-top status.
> 
> 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.
> 
> 
>>How about if we make a few well-placed changes to the DIX window
>>restacking code. Then we'll need some way to specify the window.
>>Maybe we can add it it XFIXES.
> 
> 
> We must be able to set/clear this new attribute, and we need a request
> that will return the whole list of children and their always-on-top
> flags.
> 
> 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.
> 
> 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);
> 
> 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.
> 
> -keith
> 



More information about the xorg-arch mailing list