Finishing Composite to handle transformed windows

Keith Packard keithp at
Mon Jan 9 11:18:17 PST 2006

On Mon, 2006-01-09 at 12:06 -0500, Adam Jackson wrote:

> I did look into modifying the DRI to not clip DRI drawables if they're being 
> occluded by manually redirected windows.  This turned out to be non-trivial, 
> the ClipNotify chain only gives you the window being clipped and not the 
> window doing the clipping.  The MarkOverlappedWindows chain might give me 
> enough information to do this but that seems remarkably heavy.

The simple thing is to make Composite do this for all clip lists, not
just the DRI one.

> The complementary problem is skipping clipping when the direct-rendered 
> surface is itself redirected.  I think compRedirectWindow needs to grow a 
> notifier chain, and the DRI protocol or its moral equivalent extended to pass 
> the notification of front-buffer move to the client.

You'll actually have to redirect the drawing, and for that you know
where to draw given an arbitrary window -- you get the pixmap and the
clip list in the window object... You can tell when this changes as you
can hook SetWindowPixmap.

> And then finally the DRI needs the ability to post Damage events to the server 
> on SwapBuffers and other front buffer updates, but that's pretty trivial and 
> not directly related to the above.

Yes, Damage has exposed functions that should do what you want already.

> As you mentioned though, that does require that the server's GLX add all the 
> right visual properties to the root window, which sounds like a configuration 
> headache.

Or we fix GLX so you can set the configuration for a window separately
from the visual. Perhaps just some optional state in a window which
overrides the Visual-based configuration information? Set that before
creating the GL context?
> The way I've been thinking about it is that redirected windows logically live 
> in a rootless underlay that never gets exposed and never clips.  I don't know 
> if that's the right model to do in the code, it's sounding like the topmost 
> stack idea is simplest.

Deron has already implemented the redirect-windows-don't-clip version,
although I'm not sure he restricted it to manual redirected windows
(which would be required).

topmost is more complicated from the wire perspective, and I'm generally
averse to gratuitous visible complexity. If we can make things "just
work" without it, that seems better. We can always come back and add
topmost windows later, but with Composite, I'm not sure we ever will
need to make this explicit in the X server state.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <>

More information about the xorg mailing list