Don't crash when a parent relative bg pixmap is set, and no parent has a
2007-12-03 Richard Hult <richard@imendio.com> * gdk/quartz/gdkwindow-quartz.c: (gdk_window_impl_quartz_begin_paint_region): Don't crash when a parent relative bg pixmap is set, and no parent has a bg pixmap. Fixes bug #500804. svn path=/trunk/; revision=19100
This commit is contained in:

committed by
Richard Hult

parent
f9e4618bda
commit
4a1478d6d7
@ -1,3 +1,10 @@
|
|||||||
|
2007-12-03 Richard Hult <richard@imendio.com>
|
||||||
|
|
||||||
|
* gdk/quartz/gdkwindow-quartz.c:
|
||||||
|
(gdk_window_impl_quartz_begin_paint_region): Don't crash when a
|
||||||
|
parent relative bg pixmap is set, and no parent has a bg
|
||||||
|
pixmap. Fixes bug #500804.
|
||||||
|
|
||||||
2007-12-03 Matthias Clasen <mclasen@redhat.com>
|
2007-12-03 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
Two optimizations for icon cache lookups.
|
Two optimizations for icon cache lookups.
|
||||||
|
@ -209,7 +209,7 @@ gdk_window_impl_quartz_begin_paint_region (GdkPaintable *paintable,
|
|||||||
x_offset = y_offset = 0;
|
x_offset = y_offset = 0;
|
||||||
|
|
||||||
window = GDK_WINDOW (drawable_impl->wrapper);
|
window = GDK_WINDOW (drawable_impl->wrapper);
|
||||||
while (window && ((GdkWindowObject *) window)->bg_pixmap == GDK_PARENT_RELATIVE_BG)
|
while (window && bg_pixmap == GDK_PARENT_RELATIVE_BG)
|
||||||
{
|
{
|
||||||
/* If this window should have the same background as the parent,
|
/* If this window should have the same background as the parent,
|
||||||
* fetch the parent. (And if the same goes for the parent, fetch
|
* fetch the parent. (And if the same goes for the parent, fetch
|
||||||
@ -218,6 +218,16 @@ gdk_window_impl_quartz_begin_paint_region (GdkPaintable *paintable,
|
|||||||
x_offset += ((GdkWindowObject *) window)->x;
|
x_offset += ((GdkWindowObject *) window)->x;
|
||||||
y_offset += ((GdkWindowObject *) window)->y;
|
y_offset += ((GdkWindowObject *) window)->y;
|
||||||
window = GDK_WINDOW (((GdkWindowObject *) window)->parent);
|
window = GDK_WINDOW (((GdkWindowObject *) window)->parent);
|
||||||
|
bg_pixmap = ((GdkWindowObject *) window)->bg_pixmap;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (bg_pixmap == NULL || bg_pixmap == GDK_NO_BG || bg_pixmap == GDK_PARENT_RELATIVE_BG)
|
||||||
|
{
|
||||||
|
/* Parent relative background but the parent doesn't have a
|
||||||
|
* pixmap.
|
||||||
|
*/
|
||||||
|
g_free (rects);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Note: There should be a CG API to draw tiled images, we might
|
/* Note: There should be a CG API to draw tiled images, we might
|
||||||
|
Reference in New Issue
Block a user