[mutter] compositor: Update composite overlay window before unredirecting



commit 72f5a36522c2cadf01a7abf63843c2ece429e737
Author: Chris Wilson <chris chris-wilson co uk>
Date:   Mon Feb 2 14:18:06 2015 +0000

    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 <jstpierre mecheye net>
    Date:   Fri Dec 6 17:10:44 2013 -0500
    
        compositor: Simplify the unredirected window management code
    
    Cc: Jasper St. Pierre <jstpierre mecheye net>
    Signed-off-by: Chris Wilson <chris chris-wilson co uk>
    
    https://bugzilla.gnome.org/show_bug.cgi?id=743858

 src/compositor/compositor.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/src/compositor/compositor.c b/src/compositor/compositor.c
index cc542c4..250d489 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]