[gtk+] Fix read of non-initialized clip_region



commit 454160ad9e39e75d9c37dd43f445b8b3540bba57
Author: Alexander Larsson <alexl redhat com>
Date:   Sat Jul 18 21:56:03 2009 +0200

    Fix read of non-initialized clip_region
    
    Foreign children are always viewable but may not have a viewable
    parent, so ensure we don't read the parent for them.

 gdk/gdkwindow.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 10fc70a..eeb8932 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -783,7 +783,12 @@ recompute_visible_regions_internal (GdkWindowObject *private,
       r.height = private->height;
       new_clip = gdk_region_rectangle (&r);
 
-      if (private->parent != NULL && private->parent->window_type != GDK_WINDOW_ROOT)
+      if (private->parent != NULL &&
+	  private->parent->window_type != GDK_WINDOW_ROOT &&
+	  /* For foreign children, don't remove local parents, as parent
+	     may not be mapped yet, and the non-native parents are not really
+	     enforced for it anyways. */
+	  private->window_type != GDK_WINDOW_FOREIGN)
 	{
 	  gdk_region_intersect (new_clip, private->parent->clip_region);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]