Commit 9504caf1 authored by Ville Syrjälä's avatar Ville Syrjälä Committed by Keith Packard

composite: Inhibit window background paint with manual subwindow redirection

The composite extension spec says that window background painting
should be inhibited when the subwindow redirection mode is set to
manual.

This eliminates the ugly flashing effect when compiz unredirects a
fullscreen window.
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@nokia.com>
Reviewed-by: default avatarOwen Taylor <otaylor@fishsoup.net>
Reviewed-by: default avatarKeith Packard <keithp@keithp.com>
Signed-off-by: default avatarKeith Packard <keithp@keithp.com>
parent f1d75f3b
......@@ -434,6 +434,7 @@ compRedirectSubwindows (ClientPtr pClient, WindowPtr pWin, int update)
* critical output
*/
DamageExtSetCritical (pClient, TRUE);
pWin->inhibitBGPaint = TRUE;
}
return Success;
}
......@@ -466,6 +467,7 @@ compFreeClientSubwindows (WindowPtr pWin, XID id)
*/
DamageExtSetCritical (pClient, FALSE);
csw->update = CompositeRedirectAutomatic;
pWin->inhibitBGPaint = FALSE;
if (pWin->mapped)
(*pWin->drawable.pScreen->ClearToBackground)(pWin, 0, 0, 0, 0, TRUE);
}
......
......@@ -169,6 +169,7 @@ typedef struct _Window {
#endif
#ifdef COMPOSITE
unsigned damagedDescendants:1; /* some descendants are damaged */
unsigned inhibitBGPaint:1; /* paint the background? */
#endif
} WindowRec;
......
......@@ -575,6 +575,10 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what)
tile_x_off = pWin->drawable.x - draw_x_off;
tile_y_off = pWin->drawable.y - draw_y_off;
fill = pWin->background;
#ifdef COMPOSITE
if (pWin->inhibitBGPaint)
return;
#endif
switch (pWin->backgroundState) {
case None:
return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment