[gtk+/layered-windows: 9/10] gdk: Fix repaint of layered region during scroll
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/layered-windows: 9/10] gdk: Fix repaint of layered region during scroll
- Date: Thu, 1 Dec 2011 16:49:31 +0000 (UTC)
commit d48c8588565bf91c526a0bd6c0be6612d7e16259
Author: Alexander Larsson <alexl redhat com>
Date: Thu Dec 1 16:45:18 2011 +0100
gdk: Fix repaint of layered region during scroll
gdk/gdkwindow.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 0f53f23..048d2bb 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -6311,7 +6311,7 @@ gdk_window_scroll (GdkWindow *window,
gint dy)
{
GdkWindow *impl_window;
- cairo_region_t *copy_area, *noncopy_area;
+ cairo_region_t *copy_area, *noncopy_area, *old_layered_area;
cairo_region_t *old_native_child_region, *new_native_child_region;
GList *tmp_list;
@@ -6325,6 +6325,7 @@ gdk_window_scroll (GdkWindow *window,
gdk_window_flush_if_exposing (window);
+ old_layered_area = cairo_region_copy (window->layered_region);
old_native_child_region = collect_native_child_region (window, FALSE);
if (old_native_child_region)
{
@@ -6366,6 +6367,7 @@ gdk_window_scroll (GdkWindow *window,
/* Calculate the area that can be gotten by copying the old area */
copy_area = cairo_region_copy (window->clip_region);
+ cairo_region_subtract (copy_area, old_layered_area);
if (old_native_child_region)
{
/* Don't copy from inside native children, as this is copied by
@@ -6379,6 +6381,7 @@ gdk_window_scroll (GdkWindow *window,
}
cairo_region_translate (copy_area, dx, dy);
cairo_region_intersect (copy_area, window->clip_region);
+ cairo_region_subtract (copy_area, window->layered_region);
/* And the rest need to be invalidated */
noncopy_area = cairo_region_copy (window->clip_region);
@@ -6400,6 +6403,7 @@ gdk_window_scroll (GdkWindow *window,
gdk_window_invalidate_region_full (window, noncopy_area, TRUE, CLEAR_BG_ALL);
cairo_region_destroy (noncopy_area);
+ cairo_region_destroy (old_layered_area);
if (old_native_child_region)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]