From df36dcac197e8287ef5626d71556173b942c3f58 Mon Sep 17 00:00:00 2001 From: lukefromdc Date: Tue, 11 Jul 2017 15:19:07 -0400 Subject: fix applet crashes on transparent user-set panel bg Avoid cairo function that seemed to be causing crashes related to setting geometry, use code copied from panel-background.c instead --- libmate-panel-applet/mate-panel-applet.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'libmate-panel-applet/mate-panel-applet.c') diff --git a/libmate-panel-applet/mate-panel-applet.c b/libmate-panel-applet/mate-panel-applet.c index a1cbc225..3bbaab82 100644 --- a/libmate-panel-applet/mate-panel-applet.c +++ b/libmate-panel-applet/mate-panel-applet.c @@ -1350,8 +1350,10 @@ mate_panel_applet_get_pattern_from_pixmap (MatePanelApplet *applet, width = gdk_window_get_width(window); height = gdk_window_get_height(window); - surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height); - + surface = gdk_window_create_similar_surface (window, + CAIRO_CONTENT_COLOR_ALPHA, + width, + height); gdk_error_trap_push (); cr = cairo_create (surface); cairo_set_source_surface (cr, background, -x, -y); -- cgit v1.2.1