From 72f5a36522c2cadf01a7abf63843c2ece429e737 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 2 Feb 2015 14:18:06 +0000 Subject: [PATCH] compositor: Update composite overlay window before unredirecting The current ordering updates the clip shape of the composite overlay window after unredirecting the target window. This has the effect of forcing X to clear the target window and sending an expose to the application to repaint - causing an unsightly flash. If we update the shape first, then unredirect, X restores the background of the root window (sending no expose events as no one is interested) and the background is typically NONE for the root window. Then the unredirect paints the contents of the composite backing pixmap over top without requiring a round trip and waiting for the client to repaint - thus no flashing. Fixes regression from commit d6282716b2a64051fbb2b60705569b5f275471e3 Author: Jasper St. Pierre Date: Fri Dec 6 17:10:44 2013 -0500 compositor: Simplify the unredirected window management code Cc: Jasper St. Pierre Signed-off-by: Chris Wilson https://bugzilla.gnome.org/show_bug.cgi?id=743858 --- src/compositor/compositor.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/compositor/compositor.c b/src/compositor/compositor.c index cc542c4ca..250d489b0 100644 --- a/src/compositor/compositor.c +++ b/src/compositor/compositor.c @@ -614,6 +614,7 @@ set_unredirected_window (MetaCompositor *compositor, meta_window_actor_set_unredirected (window_actor, FALSE); } + meta_shape_cow_for_window (compositor, window); compositor->unredirected_window = window; if (compositor->unredirected_window != NULL) @@ -621,8 +622,6 @@ set_unredirected_window (MetaCompositor *compositor, MetaWindowActor *window_actor = META_WINDOW_ACTOR (meta_window_get_compositor_private (compositor->unredirected_window)); meta_window_actor_set_unredirected (window_actor, TRUE); } - - meta_shape_cow_for_window (compositor, compositor->unredirected_window); } void