On Tue, Aug 2, 2011 at 4:33 AM, Ville Syrjälä <[email protected]> wrote: > On Tue, Aug 02, 2011 at 02:57:39AM +0800, Sam Spilsbury wrote: >> On Fri, Jul 29, 2011 at 8:19 PM, Ville Syrjala <[email protected]> wrote: >> > With the X server patches [1] and [2] this avoid blinkng when a >> > fullscreen window is unredirected. >> > >> > [1] http://lists.x.org/archives/xorg-devel/2011-April/021450.html >> > [2] http://lists.x.org/archives/xorg-devel/2011-May/022015.html >> > --- >> > plugins/composite/src/window.cpp | 8 ++++---- >> > 1 files changed, 4 insertions(+), 4 deletions(-) >> > >> > diff --git a/plugins/composite/src/window.cpp >> > b/plugins/composite/src/window.cpp >> > index b4a8102..35ee5fc 100644 >> > --- a/plugins/composite/src/window.cpp >> > +++ b/plugins/composite/src/window.cpp >> > @@ -201,16 +201,16 @@ CompositeWindow::unredirect () >> > >> > release (); >> > >> > - XCompositeUnredirectWindow (screen->dpy (), >> > - ROOTPARENT (priv->window), >> > - CompositeRedirectManual); >> > - >> > priv->redirected = false; >> > priv->overlayWindow = true; >> > priv->cScreen->overlayWindowCount ()++; >> > >> > if (priv->cScreen->overlayWindowCount () > 0) >> > priv->cScreen->updateOutputWindow (); >> > + >> > + XCompositeUnredirectWindow (screen->dpy (), >> > + ROOTPARENT (priv->window), >> > + CompositeRedirectManual); >> > } >> >> >> Hey Ville, >> >> I'm happy to merge this patch, just wanted to double check before I >> did - the intention here is to change the bounding shape region of the >> output window while background painting of the unredirected window is >> uninhibited so that the window doesn't flicker out then back in again >> when unredirected right? > > Not quite, we're inhibiting the background painting for the root window. > > The idea is to avoid obscuring the target window at any point > during the transition. If the shape of the composite overlay > window is set to empty after the target window has been unredirected, > the composite overlay will briefly obscure the target window, causing > the target window to be re-exposed and repainted. So the shape for the > composite overlay must be set to empty before the target window is > unredirected. That, on the other hand, causes the root window to be > exposed briefly. Patch [2] causes the root window background painting > to be inhibited when it gets exposed, leaving the screen contents > unchanged. The result is that the target window is never obscured, and > so doesn't need to be repainted even once.
Ah right, so it essentially avoids an needless repaint because the window was exposed. Thanks, merging now. > > When going to the other direction (from unredirected to redirected), > the order of the two operations must be reversed. But the code already > has the correct order, so no patch is necessary. > > You could get the same effect even without patch [2], by always keeping > an unredirected window, with background pixmap = None, just above the > root window. Unfortunately there's no such workaround for patchset [1], > so this change won't help if the X server is too old. > > -- > Ville Syrjälä > [email protected] > http://www.sci.fi/~syrjala/ > _______________________________________________ > dev mailing list > [email protected] > http://lists.compiz.org/mailman/listinfo/dev > -- Sam Spilsbury _______________________________________________ dev mailing list [email protected] http://lists.compiz.org/mailman/listinfo/dev
