summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlukefromdc <[email protected]>2017-07-11 15:19:07 -0400
committerlukefromdc <[email protected]>2017-07-11 15:19:07 -0400
commitdf36dcac197e8287ef5626d71556173b942c3f58 (patch)
treef0ee65f665fa6c9d7e1377a9cc9505607cd6122d
parentab786fa5282be8169b9c94d258cc57d07944ed13 (diff)
downloadmate-panel-df36dcac197e8287ef5626d71556173b942c3f58.tar.bz2
mate-panel-df36dcac197e8287ef5626d71556173b942c3f58.tar.xz
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
-rw-r--r--libmate-panel-applet/mate-panel-applet.c6
1 files changed, 4 insertions, 2 deletions
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);