summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlukefromdc <[email protected]>2017-06-25 00:23:03 -0400
committerraveit65 <[email protected]>2017-07-02 10:31:28 +0200
commitf9b26cd79b439e0f29cbee5c4178f152443de729 (patch)
tree407983e3a94e837190cd27ce190e9e3572106626
parentb652631aa78987e339d0f182431ee77dc05e372c (diff)
downloadmate-panel-f9b26cd79b439e0f29cbee5c4178f152443de729.tar.bz2
mate-panel-f9b26cd79b439e0f29cbee5c4178f152443de729.tar.xz
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
-rw-r--r--libmate-panel-applet/mate-panel-applet.c3
1 files changed, 2 insertions, 1 deletions
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);