summaryrefslogtreecommitdiff
path: root/gtk/gtkspinbutton.c
diff options
context:
space:
mode:
authorMichael Natterer <mitch@gimp.org>2011-01-21 15:06:43 +0100
committerMichael Natterer <mitch@gimp.org>2011-01-21 15:06:43 +0100
commit7fabfec5333c6bf8ab40082e3c5e56f1d525650c (patch)
tree82bed6b9905a076f2383cfb1e7aaf4c3c69fbc94 /gtk/gtkspinbutton.c
parent287a3884157fff03873db8fbe29d8423034eef29 (diff)
downloadgtk+-7fabfec5333c6bf8ab40082e3c5e56f1d525650c.tar.gz
gtk: save/restore the cairo_t around early upchaining in draw()
and don't save/restore the style context because that's the job of each draw() implementation.
Diffstat (limited to 'gtk/gtkspinbutton.c')
-rw-r--r--gtk/gtkspinbutton.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/gtk/gtkspinbutton.c b/gtk/gtkspinbutton.c
index e31796855d..1d357e38ae 100644
--- a/gtk/gtkspinbutton.c
+++ b/gtk/gtkspinbutton.c
@@ -921,12 +921,10 @@ gtk_spin_button_draw (GtkWidget *widget,
is_rtl = (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL);
context = gtk_widget_get_style_context (widget);
- gtk_style_context_save (context);
-
- GTK_WIDGET_CLASS (gtk_spin_button_parent_class)->draw (widget, cr);
- gtk_style_context_restore (context);
cairo_save (cr);
+ GTK_WIDGET_CLASS (gtk_spin_button_parent_class)->draw (widget, cr);
+ cairo_restore (cr);
state = gtk_widget_get_state_flags (widget);
@@ -953,7 +951,6 @@ gtk_spin_button_draw (GtkWidget *widget,
gtk_spin_button_draw_arrow (spin, context, cr, GTK_ARROW_DOWN);
gtk_style_context_restore (context);
- cairo_restore (cr);
return FALSE;
}