[gtk+] Only handle viewable windows in collect_native_child_region
- From: Alexander Larsson <alexl src gnome org>
- To: svn-commits-list gnome org
- Subject: [gtk+] Only handle viewable windows in collect_native_child_region
- Date: Sat, 18 Jul 2009 21:18:21 +0000 (UTC)
commit b36b7000f194cd16cfa5f07b0fb07afbd1f7bbf9
Author: Alexander Larsson <alexl redhat com>
Date: Sat Jul 18 21:53:15 2009 +0200
Only handle viewable windows in collect_native_child_region
There is no need to handle non-viewable windows and additionally
they may not have the clip region set yet.
gdk/gdkwindow.c | 34 +++++++++++++++++++---------------
1 files changed, 19 insertions(+), 15 deletions(-)
---
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 7ee32c0..35416b4 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -6364,6 +6364,9 @@ collect_native_child_region_helper (GdkWindowObject *window,
{
child = l->data;
+ if (!GDK_WINDOW_IS_MAPPED (child) || child->input_only)
+ continue;
+
if (child->impl != impl)
{
tmp = gdk_region_copy (child->clip_region);
@@ -6393,7 +6396,7 @@ collect_native_child_region (GdkWindowObject *window,
{
GdkRegion *region;
- if (include_this && gdk_window_has_impl (window))
+ if (include_this && gdk_window_has_impl (window) && window->viewable)
return gdk_region_copy (window->clip_region);
region = NULL;
@@ -6443,6 +6446,7 @@ gdk_window_move_resize_internal (GdkWindow *window,
old_x = private->x;
old_y = private->y;
+ old_native_child_region = NULL;
if (gdk_window_is_viewable (window) &&
!private->input_only)
{
@@ -6451,21 +6455,21 @@ gdk_window_move_resize_internal (GdkWindow *window,
old_region = gdk_region_copy (private->clip_region);
/* Adjust region to parent window coords */
gdk_region_offset (old_region, private->x, private->y);
- }
- old_native_child_region = collect_native_child_region (private, TRUE);
- if (old_native_child_region)
- {
- /* Adjust region to parent window coords */
- gdk_region_offset (old_native_child_region, private->x, private->y);
+ old_native_child_region = collect_native_child_region (private, TRUE);
+ if (old_native_child_region)
+ {
+ /* Adjust region to parent window coords */
+ gdk_region_offset (old_native_child_region, private->x, private->y);
- /* Any native window move will immediately copy stuff to the destination, which may overwrite a
- * source or destination for a delayed GdkWindowRegionMove. So, we need
- * to flush those here for the parent window and all overlapped subwindows
- * of it. And we need to do this before setting the new clips as those will be
- * affecting this.
- */
- gdk_window_flush_recursive (private->parent);
+ /* Any native window move will immediately copy stuff to the destination, which may overwrite a
+ * source or destination for a delayed GdkWindowRegionMove. So, we need
+ * to flush those here for the parent window and all overlapped subwindows
+ * of it. And we need to do this before setting the new clips as those will be
+ * affecting this.
+ */
+ gdk_window_flush_recursive (private->parent);
+ }
}
/* Set the new position and size */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]