]> Pileus Git - ~andy/gtk/commitdiff
gdk: Fix repaint of layered region during move_region
authorAlexander Larsson <alexl@redhat.com>
Thu, 1 Dec 2011 15:45:36 +0000 (16:45 +0100)
committerAlexander Larsson <alexl@redhat.com>
Thu, 1 Dec 2011 21:08:00 +0000 (22:08 +0100)
gdk/gdkwindow.c

index c13b9a88b88ddbe2f5756bb193532a27f5420397..04026ac4144eb09ea42ba880dc5e0a47c5acaccb 100644 (file)
@@ -6409,12 +6409,17 @@ gdk_window_move_region (GdkWindow       *window,
   impl_window = gdk_window_get_impl_window (window);
 
   /* compute source regions */
-  copy_area = cairo_region_copy (region);
+  if (window->has_alpha_background)
+    copy_area = cairo_region_create (); /* Copy nothing for alpha windows */
+  else
+    copy_area = cairo_region_copy (region);
   cairo_region_intersect (copy_area, window->clip_region_with_children);
+  cairo_region_subtract (copy_area, window->layered_region);
 
   /* compute destination regions */
   cairo_region_translate (copy_area, dx, dy);
   cairo_region_intersect (copy_area, window->clip_region_with_children);
+  cairo_region_subtract (copy_area, window->layered_region);
 
   /* Invalidate parts of the region (source and dest) not covered
      by the copy */