diff options
-rw-r--r-- | libmate-panel-applet/mate-panel-applet-factory.c | 4 | ||||
-rw-r--r-- | libmate-panel-applet/mate-panel-applet.c | 20 |
2 files changed, 14 insertions, 10 deletions
diff --git a/libmate-panel-applet/mate-panel-applet-factory.c b/libmate-panel-applet/mate-panel-applet-factory.c index fef1528c..cf2e6cba 100644 --- a/libmate-panel-applet/mate-panel-applet-factory.c +++ b/libmate-panel-applet/mate-panel-applet-factory.c @@ -241,9 +241,9 @@ static const gchar introspection_xml[] = "<arg name='screen' type='i' direction='in'/>" "<arg name='props' type='a{sv}' direction='in'/>" "<arg name='applet' type='o' direction='out'/>" - "<arg name='out-of-process' type='b' direction='out'/>" + "<arg name='out-of-process' type='b' direction='out'/>" "<arg name='xid' type='u' direction='out'/>" - "<arg name='uid' type='u' direction='out'/>" + "<arg name='uid' type='u' direction='out'/>" "</method>" "</interface>" "</node>"; 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"); |