[gtk+/client-side-windows: 72/284] Avoid flickering by using more temp unset bg



commit 26569bd54fdd8c920b2fe7b21e305293fc31ab45
Author: Alexander Larsson <alexl redhat com>
Date:   Thu Dec 18 22:08:39 2008 +0100

    Avoid flickering by using more temp unset bg
---
 gdk/x11/gdkwindow-x11.c |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index d893364..272b447 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -1308,10 +1308,7 @@ gdk_window_x11_show (GdkWindow *window)
   XMapWindow (xdisplay, xwindow);
   
   if (unset_bg)
-    {
-      _gdk_x11_window_tmp_reset_bg (window, TRUE);
-      gdk_window_invalidate_rect (window, NULL, TRUE);
-    }
+    _gdk_x11_window_tmp_reset_bg (window, TRUE);
 }
 
 static void
@@ -1576,15 +1573,19 @@ gdk_window_x11_reparent (GdkWindow *window,
   parent_private = (GdkWindowObject*) new_parent;
   impl = GDK_WINDOW_IMPL_X11 (window_private->impl);
 
+  _gdk_x11_window_tmp_unset_bg (window, TRUE);
+  _gdk_x11_window_tmp_unset_bg ((GdkWindow *)old_parent_private, FALSE);
   XReparentWindow (GDK_WINDOW_XDISPLAY (window),
 		   GDK_WINDOW_XID (window),
 		   GDK_WINDOW_XID (new_parent),
-		   window_private->abs_x + x, window_private->abs_y + y);
+		   parent_private->abs_x + x, parent_private->abs_y + y);
+  _gdk_x11_window_tmp_reset_bg ((GdkWindow *)old_parent_private, FALSE);
+  _gdk_x11_window_tmp_reset_bg (window, TRUE);
 
   if (GDK_WINDOW_TYPE (new_parent) == GDK_WINDOW_FOREIGN)
     new_parent = gdk_screen_get_root_window (GDK_WINDOW_SCREEN (window));
 
-  window_private->parent = (GdkWindowObject *)new_parent;
+  window_private->parent = parent_private;
 
   /* Switch the window type as appropriate */
 



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