[compiz] add compiz-fix-gtk-window-decorator-no-argb-crash.patch
Wolfgang Ulbrich
raveit65 at fedoraproject.org
Wed Apr 24 11:45:19 UTC 2013
commit 23c8725484f3385aa00cd8751bfa795a6edc28e3
Author: raveit <chat-to-me at raveit.de>
Date: Wed Apr 24 13:45:00 2013 +0200
add compiz-fix-gtk-window-decorator-no-argb-crash.patch
...iz-fix-gtk-window-decorator-no-argb-crash.patch | 49 ++++++++++++++++++++
1 files changed, 49 insertions(+), 0 deletions(-)
---
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 <seb128 at canonical.com>
+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);
++ }
+ }
+ }
+
More information about the scm-commits
mailing list