]> Pileus Git - ~andy/gtk/commitdiff
Don't do anything if exposure isn't in the event mask, plug a leak, and
authorRichard Hult <richard@imendio.com>
Sun, 3 Sep 2006 10:46:32 +0000 (10:46 +0000)
committerRichard Hult <rhult@src.gnome.org>
Sun, 3 Sep 2006 10:46:32 +0000 (10:46 +0000)
2006-09-03  Richard Hult  <richard@imendio.com>

* gdk/quartz/GdkQuartzView.c (drawRect): Don't do anything if
exposure isn't in the event mask, plug a leak, and check that the
window isn't destroyed.
(isOpaque): Check that the window isn't destroyed, fixes bug
#353028.

ChangeLog
gdk/quartz/GdkQuartzView.c

index f84cde34d3cf14784dbaf27f11209481e5d5340b..18791dfc3922015da9b05f94aacd83cdc6fd64fa 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2006-09-03  Richard Hult  <richard@imendio.com>
+
+       * gdk/quartz/GdkQuartzView.c (drawRect): Don't do anything if
+       exposure isn't in the event mask, plug a leak, and check that the
+       window isn't destroyed.
+       (isOpaque): Check that the window isn't destroyed, fixes bug 
+       #353028.
+
 2006-09-03  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtkwidget.c (gtk_widget_class_init): Fix a typo.  
index 7cd68ead94eed6609bb596a5a640703964db4795..cc0cd858f49efc620673593672bc18bfda3324ca 100644 (file)
@@ -42,6 +42,9 @@
 
 -(BOOL)isOpaque
 {
+  if (GDK_WINDOW_DESTROYED (gdk_window))
+    return YES;
+
   /* A view is opaque if its GdkWindow doesn't have the RGBA colormap */
   return gdk_drawable_get_colormap (gdk_window) != gdk_screen_get_rgba_colormap (_gdk_screen);
 }
   int count, i;
   GdkRegion *region;
 
+  if (GDK_WINDOW_DESTROYED (gdk_window))
+    return;
+
+  if (!(private->event_mask & GDK_EXPOSURE_MASK))
+    return;
+
   GDK_QUARTZ_ALLOC_POOL;
 
   [self getRectsBeingDrawn:&drawn_rects count:&count];
       impl->in_paint_rect_count --;
 
       g_object_unref (gdk_window);
-      gdk_region_destroy (event.expose.region);
     }
 
+  gdk_region_destroy (region);
+
   GDK_QUARTZ_RELEASE_POOL;
 }