[gtk+/gtk-2-24] gdk: when scrolling windows, use the correct source for copying from



commit 70715c377e11ac81a8824e2bf156ba459db5a848
Author: Benjamin Otte <otte redhat com>
Date:   Mon Mar 7 17:25:31 2011 +0100

    gdk: when scrolling windows, use the correct source for copying from
    
    Previously we were copying from the toplevel window unconditionally.
    This is wrong in two cases:
    1) composited windows
    2) different visuals
    
    So when encountering such a window in the hierarchy, we stop going up
    and just use the latest window as the source.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=643416

 gdk/gdkwindow.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 6d7f006..ea8f53b 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -3240,7 +3240,9 @@ do_move_region_bits_on_impl (GdkWindowObject *impl_window,
    * so we copy from the toplevel with INCLUDE_INFERIORS.
    */
   private = impl_window;
-  while (!gdk_window_is_toplevel (private))
+  while (!gdk_window_is_toplevel (private) &&
+         !private->composited &&
+         gdk_drawable_get_visual ((GdkDrawable *) private) == gdk_drawable_get_visual ((GdkDrawable *) private->parent))
     {
       dx -= private->parent->abs_x + private->x;
       dy -= private->parent->abs_y + private->y;



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