entry: Stop setting state flags on the style context for drawing

This commit is contained in:
Rui Matos 2011-12-17 19:27:58 +00:00
parent 721920e9e9
commit a0fd344217

View File

@ -3564,15 +3564,10 @@ gtk_entry_draw (GtkWidget *widget,
{ {
GtkEntry *entry = GTK_ENTRY (widget); GtkEntry *entry = GTK_ENTRY (widget);
GtkStyleContext *context; GtkStyleContext *context;
GtkStateFlags state;
GtkEntryPrivate *priv = entry->priv; GtkEntryPrivate *priv = entry->priv;
int i; int i;
context = gtk_widget_get_style_context (widget); context = gtk_widget_get_style_context (widget);
state = gtk_widget_get_state_flags (widget);
gtk_style_context_save (context);
gtk_style_context_set_state (context, state);
/* Draw entry_bg, shadow, progress and focus */ /* Draw entry_bg, shadow, progress and focus */
gtk_entry_draw_frame (widget, context, cr); gtk_entry_draw_frame (widget, context, cr);
@ -3604,8 +3599,6 @@ gtk_entry_draw (GtkWidget *widget,
draw_icon (widget, cr, i); draw_icon (widget, cr, i);
} }
gtk_style_context_restore (context);
return FALSE; return FALSE;
} }