[gtk+] x11: Copy from actual window, not parent



commit 8d1b7362b3f2e3d52153c2ac2e41b8926c05f143
Author: Benjamin Otte <otte redhat com>
Date:   Mon Mar 7 17:45:08 2011 +0100

    x11: Copy from actual window, not parent
    
    This code is a relic from GTK2 days and should not be necessary anymore,
    as code now makes sure to only copy those parts of the window that are
    not overlapped by parent windows.
    
    By deleting it we fix potential issues with composited and translucent
    windows copying the wrong data.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=643416

 gdk/x11/gdkgeometry-x11.c |   18 +-----------------
 1 files changed, 1 insertions(+), 17 deletions(-)
---
diff --git a/gdk/x11/gdkgeometry-x11.c b/gdk/x11/gdkgeometry-x11.c
index aa731db..580183b 100644
--- a/gdk/x11/gdkgeometry-x11.c
+++ b/gdk/x11/gdkgeometry-x11.c
@@ -271,22 +271,6 @@ _gdk_x11_window_translate (GdkWindow      *window,
   GdkWindowQueueItem *item;
   GC xgc;
   GdkRectangle extents;
-  GdkWindow *parent;
-
-  /* We need to get data from subwindows here, because we might have
-   * shaped a native window over the moving region (with bg none,
-   * so the pixels are still there). In fact we might need to get data
-   * from overlapping native window that are not children of this window,
-   * so we copy from the toplevel with INCLUDE_INFERIORS.
-   */
-  parent = window;
-  while (parent->parent != NULL &&
-         parent->parent->window_type != GDK_WINDOW_ROOT)
-    {
-      dx -= parent->parent->abs_x + parent->x;
-      dy -= parent->parent->abs_y + parent->y;
-      parent = _gdk_window_get_impl_window (parent->parent);
-    }
 
   cairo_region_get_extents (area, &extents);
 
@@ -302,7 +286,7 @@ _gdk_x11_window_translate (GdkWindow      *window,
   gdk_window_queue (window, item);
 
   XCopyArea (GDK_WINDOW_XDISPLAY (window),
-             GDK_WINDOW_XID (parent),
+             GDK_WINDOW_XID (window),
              GDK_WINDOW_XID (window),
              xgc,
              extents.x - dx, extents.y - dy,



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