diff options
author | Alexander Larsson <alexl@redhat.com> | 2009-11-03 14:47:31 +0100 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2009-11-05 12:52:12 +0100 |
commit | 4cd5c9894268966d4d8a2586a7d5a7c5c440ee33 (patch) | |
tree | 1cab583f1f068bdb6f96e6b98fa29a948064468d /gdk/gdkwindow.c | |
parent | a299797883440e7671956d73761885ec102840b0 (diff) | |
download | gtk+-4cd5c9894268966d4d8a2586a7d5a7c5c440ee33.tar.gz |
Don't unnecessarily expose areas copied by native windowing system
When moving or scrolling a window with native children, there is no
need to expose the areas that are copied by the windowing system
as part of moving/resizing the native windows anyway.
Diffstat (limited to 'gdk/gdkwindow.c')
-rw-r--r-- | gdk/gdkwindow.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c index 63eb8474ac..185200fdb4 100644 --- a/gdk/gdkwindow.c +++ b/gdk/gdkwindow.c @@ -7243,6 +7243,7 @@ gdk_window_move_resize_internal (GdkWindow *window, native windows, as we can't read that data */ gdk_region_offset (new_native_child_region, dx, dy); gdk_region_subtract (copy_area, new_native_child_region); + gdk_region_offset (new_native_child_region, -dx, -dy); } gdk_region_subtract (new_region, copy_area); @@ -7260,6 +7261,13 @@ gdk_window_move_resize_internal (GdkWindow *window, * We also invalidate any children in that area, which could include * this window if it still overlaps that area. */ + if (old_native_child_region) + { + /* No need to expose the region that the native window move copies */ + gdk_region_offset (old_native_child_region, dx, dy); + gdk_region_intersect (old_native_child_region, new_native_child_region); + gdk_region_subtract (new_region, old_native_child_region); + } gdk_window_invalidate_region (GDK_WINDOW (private->parent), new_region, TRUE); gdk_region_destroy (old_region); @@ -7453,6 +7461,13 @@ gdk_window_scroll (GdkWindow *window, move_region_on_impl (impl_window, copy_area, dx, dy); /* takes ownership of copy_area */ /* Invalidate not copied regions */ + if (old_native_child_region) + { + /* No need to expose the region that the native window move copies */ + gdk_region_offset (old_native_child_region, dx, dy); + gdk_region_intersect (old_native_child_region, new_native_child_region); + gdk_region_subtract (noncopy_area, old_native_child_region); + } gdk_window_invalidate_region (window, noncopy_area, TRUE); gdk_region_destroy (noncopy_area); |