PKGBUILDs/community/compiz-decorator-gtk/014-fix-gtk-window-decorator-no-argb-crash.patch

45 lines
1.6 KiB
Diff
Raw Normal View History

2009-10-10 02:15:33 +00:00
Index: compiz-0.5.0+git20070516/gtk/window-decorator/gtk-window-decorator.c
===================================================================
--- compiz-0.5.0+git20070516.orig/gtk/window-decorator/gtk-window-decorator.c 2007-05-16 08:37:20.000000000 -0500
+++ compiz-0.5.0+git20070516/gtk/window-decorator/gtk-window-decorator.c 2007-05-16 08:38:01.000000000 -0500
@@ -1946,10 +1946,8 @@
size = MAX (fgeom.top_height, fgeom.bottom_height);
- if (rect.width && size)
+ if (rect.width && size && (pixmap = create_pixmap (rect.width, size)))
{
- pixmap = create_pixmap (rect.width, size);
-
cr = gdk_cairo_create (GDK_DRAWABLE (pixmap));
gdk_cairo_set_source_color_alpha (cr, &bg_color, bg_alpha);
cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
@@ -2044,10 +2042,8 @@
size = MAX (fgeom.left_width, fgeom.right_width);
- if (size && rect.height)
+ if (size && rect.height && (pixmap = create_pixmap (size, rect.height)))
{
- pixmap = create_pixmap (size, rect.height);
-
cr = gdk_cairo_create (GDK_DRAWABLE (pixmap));
gdk_cairo_set_source_color_alpha (cr, &bg_color, bg_alpha);
cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
@@ -3248,9 +3244,12 @@
g_object_ref (G_OBJECT (d->icon_pixbuf));
d->icon_pixmap = pixmap_new_from_pixbuf (d->icon_pixbuf);
- cr = gdk_cairo_create (GDK_DRAWABLE (d->icon_pixmap));
- d->icon = cairo_pattern_create_for_surface (cairo_get_target (cr));
- cairo_destroy (cr);
+ if (d->icon_pixmap)
+ {
+ cr = gdk_cairo_create (GDK_DRAWABLE (d->icon_pixmap));
+ d->icon = cairo_pattern_create_for_surface (cairo_get_target (cr));
+ cairo_destroy (cr);
+ }
}
}