summaryrefslogtreecommitdiff
path: root/applets
diff options
context:
space:
mode:
authorWolfgang Ulbrich <[email protected]>2016-02-11 07:37:20 +0100
committerWolfgang Ulbrich <[email protected]>2016-02-12 07:04:30 +0100
commit14850f26540c21672a9bf22a16bbb78e47eb73d1 (patch)
tree17754de1d72a5420d47bc5754a2325c816f3e95c /applets
parent9357915cd8152da3945be48cf01f5b8499153003 (diff)
downloadmate-panel-14850f26540c21672a9bf22a16bbb78e47eb73d1.tar.bz2
mate-panel-14850f26540c21672a9bf22a16bbb78e47eb73d1.tar.xz
GTK+3 workspace-switcher: do not use rc_style
Diffstat (limited to 'applets')
-rw-r--r--applets/wncklet/workspace-switcher.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/applets/wncklet/workspace-switcher.c b/applets/wncklet/workspace-switcher.c
index be086648..ca0341bc 100644
--- a/applets/wncklet/workspace-switcher.c
+++ b/applets/wncklet/workspace-switcher.c
@@ -198,9 +198,17 @@ static void applet_change_orient(MatePanelApplet* applet, MatePanelAppletOrient
#if GTK_CHECK_VERSION (3, 0, 0)
static void applet_change_background(MatePanelApplet* applet, MatePanelAppletBackgroundType type, GdkColor* color, cairo_pattern_t *pattern, PagerData* pager)
+{
+ GtkStyleContext *new_context;
+ gtk_widget_reset_style (GTK_WIDGET (pager->pager));
+ new_context = gtk_style_context_new ();
+ gtk_style_context_set_path (new_context, gtk_widget_get_path (GTK_WIDGET (pager->pager)));
+ g_object_unref (new_context);
+
+ wnck_pager_set_shadow_type (WNCK_PAGER (pager->pager),
+ type == PANEL_NO_BACKGROUND ? GTK_SHADOW_NONE : GTK_SHADOW_IN);
#else
static void applet_change_background(MatePanelApplet* applet, MatePanelAppletBackgroundType type, GdkColor* color, GdkPixmap* pixmap, PagerData* pager)
-#endif
{
/* taken from the TrashApplet */
GtkRcStyle *rc_style;
@@ -212,10 +220,6 @@ static void applet_change_background(MatePanelApplet* applet, MatePanelAppletBac
gtk_widget_modify_style (GTK_WIDGET (pager->pager), rc_style);
g_object_unref (rc_style);
-#if GTK_CHECK_VERSION (3, 0, 0)
- wnck_pager_set_shadow_type (WNCK_PAGER (pager->pager),
- type == PANEL_NO_BACKGROUND ? GTK_SHADOW_NONE : GTK_SHADOW_IN);
-#else
switch (type)
{
case PANEL_COLOR_BACKGROUND: