summaryrefslogtreecommitdiff
path: root/applets/wncklet
diff options
context:
space:
mode:
Diffstat (limited to 'applets/wncklet')
-rw-r--r--applets/wncklet/window-menu.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/applets/wncklet/window-menu.c b/applets/wncklet/window-menu.c
index d56c77fc..e457eeeb 100644
--- a/applets/wncklet/window-menu.c
+++ b/applets/wncklet/window-menu.c
@@ -167,9 +167,10 @@ static gboolean window_menu_on_expose (GtkWidget* widget,
}
#endif
+#if GTK_CHECK_VERSION (3, 0, 0)
+#if !GTK_CHECK_VERSION (3, 19, 0)
static inline void force_no_focus_padding(GtkWidget* widget)
{
-#if GTK_CHECK_VERSION (3, 0, 0)
GtkCssProvider *provider;
provider = gtk_css_provider_new ();
@@ -183,7 +184,13 @@ static inline void force_no_focus_padding(GtkWidget* widget)
GTK_STYLE_PROVIDER (provider),
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
g_object_unref (provider);
+
+ gtk_widget_set_name(widget, "PanelApplet-window-menu-applet-button");
+}
+#endif
#else
+static inline void force_no_focus_padding(GtkWidget* widget)
+{
gboolean first_time = TRUE;
if (first_time)
@@ -199,10 +206,10 @@ static inline void force_no_focus_padding(GtkWidget* widget)
"\n");
first_time = FALSE;
}
-#endif
gtk_widget_set_name(widget, "PanelApplet-window-menu-applet-button");
}
+#endif
static void window_menu_size_allocate(MatePanelApplet* applet, GtkAllocation* allocation, WindowMenu* window_menu)
{
@@ -294,7 +301,11 @@ gboolean window_menu_applet_fill(MatePanelApplet* applet)
window_menu = g_new0(WindowMenu, 1);
window_menu->applet = GTK_WIDGET(applet);
+#if GTK_CHECK_VERSION (3, 19, 0)
+ gtk_widget_set_name (window_menu->applet, "window-menu-applet-button");
+#else
force_no_focus_padding(window_menu->applet);
+#endif
gtk_widget_set_tooltip_text(window_menu->applet, _("Window Selector"));
mate_panel_applet_set_flags(applet, MATE_PANEL_APPLET_EXPAND_MINOR);