[gtk+/client-side-windows: 63/284] Move all native children (recursively) in gdk_window_scroll



commit 444246348136167ec304a193973fc6fb8784a093
Author: Alexander Larsson <alexl redhat com>
Date:   Thu Dec 18 11:43:57 2008 +0100

    Move all native children (recursively) in gdk_window_scroll
---
 gdk/gdkwindow.c           |   16 +++++-----------
 gdk/x11/gdkgeometry-x11.c |   11 -----------
 2 files changed, 5 insertions(+), 22 deletions(-)

diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 695dfde..b1a1420 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -5814,20 +5814,14 @@ gdk_window_scroll (GdkWindow *window,
       GdkWindow *child = GDK_WINDOW (tmp_list->data);
       GdkWindowObject *child_obj = GDK_WINDOW_OBJECT (child);
       
-      if (child_obj->impl == private->impl)
-	{
-	  /* Just update the positions, the bits will move with the copy */
-	  child_obj->x += dx;
-	  child_obj->y += dy;
-	}
-      else
-	{
-	  /* Native window, need to move it */
-	  GDK_WINDOW_IMPL_GET_IFACE (private->impl)->move_resize (window, TRUE, child_obj->x + dx, child_obj->y + dy, -1, -1);
-	}
+      /* Just update the positions, the bits will move with the copy */
+      child_obj->x += dx;
+      child_obj->y += dy;
       
       tmp_list = tmp_list->next;
     }
+
+  move_native_children (private);
   
   recompute_visible_regions (private, FALSE, TRUE);
 
diff --git a/gdk/x11/gdkgeometry-x11.c b/gdk/x11/gdkgeometry-x11.c
index b88d4ee..93851b4 100644
--- a/gdk/x11/gdkgeometry-x11.c
+++ b/gdk/x11/gdkgeometry-x11.c
@@ -201,17 +201,6 @@ _gdk_window_move_resize_child (GdkWindow *window,
   impl = GDK_WINDOW_IMPL_X11 (GDK_WINDOW_OBJECT (window)->impl);
   obj = GDK_WINDOW_OBJECT (window);
 
-  dx = x - obj->x;
-  dy = y - obj->y;
-  
-  is_move = dx != 0 || dy != 0;
-  is_resize = obj->width != width || obj->height != height;
-
-#if 0 /* Not right, doesn't take abs_x/y into consideration */
-  if (!is_move && !is_resize)
-    return;
-#endif
-  
   obj->x = x;
   obj->y = y;
   obj->width = width;



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