Unredirecting the window on top of the stack
michel at tungstengraphics.com
Wed Jun 7 01:48:44 PDT 2006
On Tue, 2006-06-06 at 23:16 +0200, Olivier Fourdan wrote:
> A recent thread on the Xfce ML brought my attention to a problem with
> OpenGL and composite indirect rendering.
> When enabling the compositor, the OpenGL apps are redirected to pixmaps
> and the compositing manager then copy the contents to screen, causing a
> performance hit.
> I thought it was unavoidable, but the people at nVidia posted on a
> dedicated forum that the compositing manager should unredirect windows
> that don't need it so that applications fully visible and opaque would
> not suffer from the redirecting.
> So I tried to achieve that with the embedded compositor in xfwm4 (xfce
> window manager). At the beginning, the embedded compositor simply calls
> XCompositeRedirectSubwindows() on the root windows (of the various
> managed screens) so that all windows are properly redirected. But
> unredirecting/redirecting some window(s) on the fly makes things a
> little more complex for me :)
> I try to call XCompositeUnredirectSubwindows() on the window frame of
> the window on top of stack, but also XCompositeUnredirectWindow() on the
> client window but I'm not getting much success. Once I called
> XCompositeUnredirectWindow(), the window doesn't seem to be drawn
> directly unlike I would have expected and I also get some refresh issues.
> Am I missing something obvious? Any hint would help ;)
I can't help you myself, but I think you should take a look at compiz,
which seems to have this working. I agree that it would be a nice
feature, good to hear you're working on it.
BTW, while I have your attention. :) I'm attaching an xfwm4 patch I've
been using to avoid needlessly re-compositing opaque windows in front of
other damaged windows. This also helps with stuff that isn't properly
redirected yet, such as Xv and DRI with free drivers.
Earthling Michel Dänzer | http://tungstengraphics.com
Libre software enthusiast | Debian, X and DRI developer
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 835 bytes
Desc: not available
More information about the xorg