From f9b26cd79b439e0f29cbee5c4178f152443de729 Mon Sep 17 00:00:00 2001 From: lukefromdc Date: Sun, 25 Jun 2017 00:23:03 -0400 Subject: GTK 3.18+ fix transparent default panel bg Transparent panel backgrounds set in GTK themes have not worked since the GTK 3.20 PanelPlug work. This was because NULL in gtk_window_set_background_pattern breaks on alpha values. Force this transparent and the GTK background is properly drawn --- libmate-panel-applet/mate-panel-applet.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libmate-panel-applet') diff --git a/libmate-panel-applet/mate-panel-applet.c b/libmate-panel-applet/mate-panel-applet.c index 9ec18493..5efde6b3 100644 --- a/libmate-panel-applet/mate-panel-applet.c +++ b/libmate-panel-applet/mate-panel-applet.c @@ -1538,7 +1538,8 @@ mate_panel_applet_change_background(MatePanelApplet *applet, _mate_panel_applet_apply_css(GTK_WIDGET(applet->priv->plug),type); switch (type) { case PANEL_NO_BACKGROUND: - gdk_window_set_background_pattern(window,NULL); + pattern = cairo_pattern_create_rgba (0,0,0,0); /* Using NULL here breaks transparent */ + gdk_window_set_background_pattern(window,pattern); /* backgrounds set by GTK theme */ break; case PANEL_COLOR_BACKGROUND: gdk_window_set_background_rgba(window,color); -- cgit v1.2.1