[gtk+] Invalidate old source in gdk_window_move_region
- From: Alexander Larsson <alexl src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gtk+] Invalidate old source in gdk_window_move_region
- Date: Thu, 13 Aug 2009 12:40:39 +0000 (UTC)
commit 043ca236f2f9678638e05b435bdf675f80b631b1
Author: Alexander Larsson <alexl redhat com>
Date: Thu Aug 13 13:32:17 2009 +0200
Invalidate old source in gdk_window_move_region
When we copy the region we need to also re-expose the areas of
the copied region that was not also in the destination.
And, we need to do this invalidation after the move, as the
move also moves any invalid area.
gdk/gdkwindow.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 04d8010..211d672 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -6960,17 +6960,19 @@ gdk_window_move_region (GdkWindow *window,
gdk_region_offset (copy_area, dx, dy);
gdk_region_intersect (copy_area, private->clip_region_with_children);
- /* invalidate parts of the region not covered by the copy */
+ /* Invalidate parts of the region (source and dest) not covered
+ by the copy */
nocopy_area = gdk_region_copy (region);
gdk_region_offset (nocopy_area, dx, dy);
+ gdk_region_union (nocopy_area, region);
gdk_region_subtract (nocopy_area, copy_area);
- gdk_window_invalidate_region (window, nocopy_area, FALSE);
- gdk_region_destroy (nocopy_area);
/* convert from window coords to impl */
gdk_region_offset (copy_area, private->abs_x, private->abs_y);
-
move_region_on_impl (impl_window, copy_area, dx, dy); /* Takes ownership of copy_area */
+
+ gdk_window_invalidate_region (window, nocopy_area, FALSE);
+ gdk_region_destroy (nocopy_area);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]