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
This commit is contained in:
		| @ -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, | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Benjamin Otte
					Benjamin Otte