summaryrefslogtreecommitdiff
path: root/libmate-panel-applet/mate-panel-applet.c
diff options
context:
space:
mode:
Diffstat (limited to 'libmate-panel-applet/mate-panel-applet.c')
-rw-r--r--libmate-panel-applet/mate-panel-applet.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/libmate-panel-applet/mate-panel-applet.c b/libmate-panel-applet/mate-panel-applet.c
index 5a46080e..04678823 100644
--- a/libmate-panel-applet/mate-panel-applet.c
+++ b/libmate-panel-applet/mate-panel-applet.c
@@ -1550,7 +1550,6 @@ mate_panel_applet_change_background(MatePanelApplet *applet,
cairo_pattern_t *pattern)
{
GtkStyleContext* context;
- MatePanelAppletOrient orientation;
GdkWindow* window;
#if GTK_CHECK_VERSION (3, 18, 0)
if (applet->priv->out_of_process)
@@ -1571,18 +1570,24 @@ mate_panel_applet_change_background(MatePanelApplet *applet,
}
break;
case PANEL_COLOR_BACKGROUND:
- gdk_window_set_background_rgba(window,color);
+ if (applet->priv->out_of_process){
+ gdk_window_set_background_rgba(window,color);
#if GTK_CHECK_VERSION (3, 18, 0)
- if (applet->priv->out_of_process)
- gtk_widget_queue_draw (applet->priv->plug); /*change the bg right away always */
+ gtk_widget_queue_draw (applet->priv->plug); /*change the bg right away always */
+#else
+ gtk_widget_queue_draw (GTK_WIDGET(applet));
#endif
+ }
break;
case PANEL_PIXMAP_BACKGROUND:
- gdk_window_set_background_pattern(window,pattern);
+ if (applet->priv->out_of_process){
+ gdk_window_set_background_pattern(window,pattern);
#if GTK_CHECK_VERSION (3, 18, 0)
- if (applet->priv->out_of_process)
- gtk_widget_queue_draw (applet->priv->plug); /*change the bg right away always */
+ gtk_widget_queue_draw (applet->priv->plug); /*change the bg right away always */
+#else
+ gtk_widget_queue_draw (GTK_WIDGET(applet));
#endif
+ }
break;
default:
g_assert_not_reached ();
@@ -1590,7 +1595,6 @@ mate_panel_applet_change_background(MatePanelApplet *applet,
}
if (applet->priv->out_of_process){
context = gtk_widget_get_style_context (GTK_WIDGET(applet->priv->plug));
- orientation = mate_panel_applet_get_orient (applet);
if (applet->priv->orient == MATE_PANEL_APPLET_ORIENT_UP ||
applet->priv->orient == MATE_PANEL_APPLET_ORIENT_DOWN){
gtk_style_context_add_class(context,"horizontal");