Don't do anything if exposure isn't in the event mask, plug a leak, and

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.
This commit is contained in:
Richard Hult 2006-09-03 10:46:32 +00:00 committed by Richard Hult
parent a7540d81d5
commit 611f5526e9
2 changed files with 19 additions and 1 deletions

View File

@ -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.

View 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);
}
@ -55,6 +58,12 @@
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];
@ -94,9 +103,10 @@
impl->in_paint_rect_count --;
g_object_unref (gdk_window);
gdk_region_destroy (event.expose.region);
}
gdk_region_destroy (region);
GDK_QUARTZ_RELEASE_POOL;
}