From 23c8725484f3385aa00cd8751bfa795a6edc28e3 Mon Sep 17 00:00:00 2001 From: raveit Date: Wed, 24 Apr 2013 13:45:00 +0200 Subject: [PATCH] add compiz-fix-gtk-window-decorator-no-argb-crash.patch --- ...x-gtk-window-decorator-no-argb-crash.patch | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 compiz-fix-gtk-window-decorator-no-argb-crash.patch diff --git a/compiz-fix-gtk-window-decorator-no-argb-crash.patch b/compiz-fix-gtk-window-decorator-no-argb-crash.patch new file mode 100644 index 0000000..71fa873 --- /dev/null +++ b/compiz-fix-gtk-window-decorator-no-argb-crash.patch @@ -0,0 +1,49 @@ +Author: Sebastien Bacher +Description: Fix decorator crash when ARGB isn't enabled + Fix gtk-window-decorator crash when ARGB isn't enabled and only + that, in this case window-decoration are invisible +Origin: vendor, ubuntu (1:0.3.6-1ubuntu9) +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/compiz/+bug/94140 +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/compiz/+bug/82205 +--- a/gtk/window-decorator/gtk-window-decorator.c ++++ b/gtk/window-decorator/gtk-window-decorator.c +@@ -1912,10 +1912,8 @@ meta_draw_window_decoration (decor_t *d) + + 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); +@@ -2014,10 +2012,8 @@ meta_draw_window_decoration (decor_t *d) + + 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); +@@ -3289,9 +3285,12 @@ update_window_decoration_icon (WnckWindo + 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); ++ } + } + } +