summaryrefslogtreecommitdiff
path: root/applets/wncklet/showdesktop.c
diff options
context:
space:
mode:
Diffstat (limited to 'applets/wncklet/showdesktop.c')
-rw-r--r--applets/wncklet/showdesktop.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/applets/wncklet/showdesktop.c b/applets/wncklet/showdesktop.c
index 0c420c15..8ef011c0 100644
--- a/applets/wncklet/showdesktop.c
+++ b/applets/wncklet/showdesktop.c
@@ -144,8 +144,10 @@ static void update_icon(ShowDesktopData* sdd)
GdkPixbuf* scaled;
int icon_size;
GError* error;
+#if !GTK_CHECK_VERSION (3, 19, 0)
int focus_width = 0;
int focus_pad = 0;
+#endif
int thickness = 0;
if (!sdd->icon_theme)
@@ -155,10 +157,12 @@ static void update_icon(ShowDesktopData* sdd)
state = gtk_widget_get_state_flags (sdd->button);
context = gtk_widget_get_style_context (sdd->button);
gtk_style_context_get_padding (context, state, &padding);
+#if !GTK_CHECK_VERSION (3, 19, 0)
gtk_style_context_get_style (context,
"focus-line-width", &focus_width,
"focus-padding", &focus_pad,
NULL);
+#endif
switch (sdd->orient) {
case GTK_ORIENTATION_HORIZONTAL:
@@ -168,8 +172,11 @@ static void update_icon(ShowDesktopData* sdd)
thickness = padding.left + padding.right;
break;
}
-
+#if GTK_CHECK_VERSION (3, 19, 0)
+ icon_size = sdd->size - thickness;
+#else
icon_size = sdd->size - 2 * (focus_width + focus_pad) - thickness;
+#endif
#else
gtk_widget_style_get (sdd->button, "focus-line-width", &focus_width, "focus-padding", &focus_pad, NULL);