summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mate-panel/button-widget.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/mate-panel/button-widget.c b/mate-panel/button-widget.c
index 52a42c57..8e5b38de 100644
--- a/mate-panel/button-widget.c
+++ b/mate-panel/button-widget.c
@@ -564,11 +564,14 @@ button_widget_expose (GtkWidget *widget,
}
if (gtk_widget_has_focus (widget)) {
+#if !GTK_CHECK_VERSION (3, 19, 0)
gint focus_pad;
+#endif
gtk_style_context_save (context);
gtk_style_context_set_state (context, state_flags);
+#if !GTK_CHECK_VERSION (3, 19, 0)
gtk_widget_style_get (widget,
"focus-padding", &focus_pad,
NULL);
@@ -576,9 +579,14 @@ button_widget_expose (GtkWidget *widget,
y = focus_pad;
w = width - 2 * focus_pad;
h = height - 2 * focus_pad;
+#endif
cairo_save (cr);
+#if GTK_CHECK_VERSION (3, 19, 0)
+ gtk_render_focus (context, cr, 0, 0, width, height);
+#else
gtk_render_focus (context, cr, x, y, w, h);
+#endif
cairo_restore (cr);
gtk_style_context_restore (context);