]> Pileus Git - ~andy/gtk/commitdiff
gtk: render GtkEventBox' background in the right state
authorMichael Natterer <mitch@gimp.org>
Fri, 14 Jan 2011 15:55:46 +0000 (16:55 +0100)
committerMichael Natterer <mitch@gimp.org>
Fri, 14 Jan 2011 15:56:50 +0000 (16:56 +0100)
gtk/gtkeventbox.c

index b8492c11253bb1c3c35de56721c9bbc5629e0746..d2d8c6d39d7df8d83d219a4c0361bf8c0a7ebdf5 100644 (file)
@@ -595,9 +595,13 @@ gtk_event_box_draw (GtkWidget *widget,
       GtkStyleContext *context;
 
       context = gtk_widget_get_style_context (widget);
+
+      gtk_style_context_save (context);
+      gtk_style_context_set_state (context, gtk_widget_get_state_flags (widget));
       gtk_render_background (context, cr, 0, 0,
                              gtk_widget_get_allocated_width (widget),
                              gtk_widget_get_allocated_height (widget));
+      gtk_style_context_restore (context);
     }
 
   GTK_WIDGET_CLASS (gtk_event_box_parent_class)->draw (widget, cr);