Finishing Composite to handle transformed windows

Andy Ritger aritger at nvidia.com
Sat Jan 7 02:35:39 PST 2006



On Fri, 6 Jan 2006, Keith Packard wrote:

> On Fri, 2006-01-06 at 19:59 -0800, Andy Ritger wrote:
> 
> > What if windows were *not* clipped by redirected children (atleast
> > for manual redirection)? 
> 
> This is appealing to me as well; in some sense, it is the parent window
> into which the child will be painted in any case, making the manual
> redirection not clip out the parent area, and yet still clip any
> non-redirected siblings avoids the issues with smashing valid window
> contents inadvertently.

Agreed.

> However, you *cannot* make all windows children of a non-root window.
> Menus and other override redirect windows are always children of the
> root. So, unless we assert that the compositing manager will draw to the
> root, there is no way this semantic will work in this case.

Ah, thanks; I forgot about override redirect windows.

> I think we need to discover whether or not drawing to the root window is
> well enough supported to require this as the target drawable. If it is,
> we can either make the above change or extend GLX to support
> IncludeInferiors rendering and be done with this problem. 

The reasons Deron listed for using a non-root window as the output
window were:

    - Java3D doesn't allow you to render to preexisting windows;
      I'm sure this is solvable

    - supposedly not all GLX implementations support rendering to
      the root window; I'd be curious what other GLX implementors
      think about it, but I would consider that a bug that should
      be fixed

I'm not real excited about a GLX extension to give a GLXContext a
subwindow_mode attribute, but it seems feasible.  I'd be curious
what other GLX implementors think about that.

> If we decide that the compositing manager must be allowed to draw to a
> non-root window, then we must create a solution for that window to hold
> the correct clip list.

It does sound heavy handed to require that the composite manager's
output window must be the root window.  However, it makes things
easier if that's enforced, and it makes sense in that the root
window is the only window that cannot itself be redirected.

> > As a side benefit, other composite managers won't need to use
> > IncludeInferiors, which feels a little kludgy to me.
> 
> Hmm. I'm thinking of a situation where some windows are ManualRedirect
> and others are not redirected, or are AutomaticRedirect. In this case,
> the desire is to have the ManaualRedirect manager paint child content
> directly to the parent window. In this case, the parent must be clipped
> by the area of any non-ManaulRedirect windows which aren't otherwise
> clipped by ManualRedirect windows. That's widgey; you've got areas of
> the parent covered by children, which because they are obscured by a
> ManualRedirect child are now not obscuring the Parent. I think that's
> easy enough to implement, but it sure feels weird...

It took me a few reads to actually understand the above.  Now I
see what you mean, and ewww.

> > A variation on the above that might provide more flexibility is to
> > turn this decision of whether redirected children clip the parent
> > into an attribute that is specified at redirection time.
> 
> I'd like to avoid useless options of this nature, and I'm not sure I see
> a use case at this point for this mode.

Fair enough; I don't have any examples where this would be desirable,
either.

Thanks,
- Andy


> -keith
> 
> 



More information about the xorg mailing list