[gtk+/gtk-3-18] gdk: Fix invalidation w/ pixel cache when changing child window geometry.
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-18] gdk: Fix invalidation w/ pixel cache when changing child window geometry.
- Date: Mon, 9 Nov 2015 16:53:15 +0000 (UTC)
commit 040a209031d2f8d93f1c8788104372755313b912
Author: Alexander Larsson <alexl redhat com>
Date: Mon Nov 9 15:14:57 2015 +0100
gdk: Fix invalidation w/ pixel cache when changing child window geometry.
When moving/scrolling a child window we can't use the current clip
region to limit what is invalidated, because there may be a pixel
cache that listens for changes outside the clip region. Instead
invalidate the entire area and rely on the invalidation code to limit
the repaint to the actually visible area.
gdk/gdkwindow.c | 24 +++++++++++++++++-------
1 files changed, 17 insertions(+), 7 deletions(-)
---
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 75d1034..c34c113 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -5761,11 +5761,16 @@ gdk_window_move_resize_internal (GdkWindow *window,
if (gdk_window_is_viewable (window) &&
!window->input_only)
{
+ GdkRectangle r;
+
expose = TRUE;
- old_region = cairo_region_copy (window->clip_region);
- /* Adjust regions to parent window coords */
- cairo_region_translate (old_region, window->x, window->y);
+ r.x = window->x;
+ r.y = window->y;
+ r.width = window->width;
+ r.height = window->height;
+
+ old_region = cairo_region_create_rectangle (&r);
}
/* Set the new position and size */
@@ -5801,9 +5806,14 @@ gdk_window_move_resize_internal (GdkWindow *window,
if (expose)
{
- new_region = cairo_region_copy (window->clip_region);
- /* Adjust region to parent window coords */
- cairo_region_translate (new_region, window->x, window->y);
+ GdkRectangle r;
+
+ r.x = window->x;
+ r.y = window->y;
+ r.width = window->width;
+ r.height = window->height;
+
+ new_region = cairo_region_create_rectangle (&r);
cairo_region_union (new_region, old_region);
@@ -5940,7 +5950,7 @@ gdk_window_scroll (GdkWindow *window,
move_native_children (window);
- gdk_window_invalidate_region_full (window, window->clip_region, TRUE);
+ gdk_window_invalidate_rect_full (window, NULL, TRUE);
_gdk_synthesize_crossing_events_for_geometry_change (window);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]