Updating branch refs/heads/master to 1b1749d5cb7421101dcbf43d085e835516d5bb8f (commit) from 86a1b73c0a5ac1760e6978ee2dca9da47adc05c5 (commit)
commit 1b1749d5cb7421101dcbf43d085e835516d5bb8f Author: Eric Koegel <eric.koe...@gmail.com> Date: Wed Feb 12 19:03:34 2014 +0300 Fix transparency with alpha being 100 (Bug 10658) A panel with style set to 'none (use system style)' and alpha to 100 is still affected by the problem which can be triggered manually by launching another indicator after the initial panel start. This patch removes an unneeded check that was causing the issue. Thanks to Thaddäus Tintenfisch for reporting the issue and finding the exact part of the code that needed to be corrected. wrapper/wrapper-plug.c | 34 +++++++++++++++------------------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/wrapper/wrapper-plug.c b/wrapper/wrapper-plug.c index 6832a35..e3c3d61 100644 --- a/wrapper/wrapper-plug.c +++ b/wrapper/wrapper-plug.c @@ -222,28 +222,24 @@ wrapper_plug_draw (GtkWidget *widget, else { alpha = gtk_widget_is_composited (GTK_WIDGET (plug)) ? plug->background_alpha : 1.00; + cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE); - if (alpha < 1.00 || plug->background_color != NULL) + /* get the background gdk color */ + if (plug->background_color != NULL) { - cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE); - - /* get the background gdk color */ - if (plug->background_color != NULL) - { - color = plug->background_color; - cairo_set_source_rgba (cr, PANEL_GDKCOLOR_TO_DOUBLE (color), alpha); - } - else - { - style = gtk_widget_get_style_context (widget); - gtk_style_context_get_background_color (style, GTK_STATE_FLAG_NORMAL, &rgba); - rgba.alpha = alpha; - gdk_cairo_set_source_rgba (cr, &rgba); - } - - /* draw the background color */ - cairo_paint (cr); + color = plug->background_color; + cairo_set_source_rgba (cr, PANEL_GDKCOLOR_TO_DOUBLE (color), alpha); } + else + { + style = gtk_widget_get_style_context (widget); + gtk_style_context_get_background_color (style, GTK_STATE_FLAG_NORMAL, &rgba); + rgba.alpha = alpha; + gdk_cairo_set_source_rgba (cr, &rgba); + } + + /* draw the background color */ + cairo_paint (cr); } cairo_restore(cr); _______________________________________________ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits