[gtk+] gdkwindow: Fix update area calculations for native subwindows



commit 6243c7122cf1a315c9b3b9ab71fad4d93f2d5275
Author: Alexander Larsson <alexl redhat com>
Date:   Tue Sep 2 16:22:12 2014 +0200

    gdkwindow: Fix update area calculations for native subwindows
    
    When recursing the update area down into native subwindows we forgot
    to apply the native window position. This caused us to repaint the
    wrong thing in certain cases. I noticed this when playing with the
    wip/gdk-gl branch, because it was triggering unnecessary repaints
    of the (native window) gl widgets.

 gdk/gdkwindow.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)
---
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index b9b2e28..0460ffc 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -3762,23 +3762,18 @@ invalidate_impl_subwindows (GdkWindow            *window,
          if (gdk_window_has_impl (child))
            {
              cairo_region_t *tmp = cairo_region_copy (region);
-             cairo_region_translate (tmp, -dx, -dy);
+             cairo_region_translate (tmp, -dx - child->x, -dy - child->y);
              gdk_window_invalidate_maybe_recurse_full (child,
                                                        tmp, child_func, user_data);
              cairo_region_destroy (tmp);
            }
          else
            {
-             dx += child->x;
-             dy += child->y;
              invalidate_impl_subwindows (child,
                                          region,
                                          child_func, user_data,
-                                         dx, dy);
-             dx -= child->x;
-             dy -= child->y;
+                                         dx + child->x, dy + child->y);
            }
-
        }
     }
 }


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