[gtk+/wip/window-unfocused-fixes: 7/13] scrolledwindow: Set state flags on draw



commit 76c3449ebe9e424f039f991be9b52e5e5a13cc4b
Author: Rui Matos <tiagomatos gmail com>
Date:   Mon Dec 12 00:13:24 2011 +0000

    scrolledwindow: Set state flags on draw
    
    https://bugzilla.gnome.org/show_bug.cgi?id=666126

 gtk/gtkscrolledwindow.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index 12f3e67..58613e4 100644
--- a/gtk/gtkscrolledwindow.c
+++ b/gtk/gtkscrolledwindow.c
@@ -1206,20 +1206,21 @@ gtk_scrolled_window_draw (GtkWidget *widget,
       GtkAllocation relative_allocation;
       GtkStyleContext *context;
       gboolean scrollbars_within_bevel;
+      GtkStateFlags state;
 
       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);
       gtk_style_context_add_class (context, GTK_STYLE_CLASS_FRAME);
 
       gtk_widget_style_get (widget, "scrollbars-within-bevel", &scrollbars_within_bevel, NULL);
 
       if (!scrollbars_within_bevel)
         {
-          GtkStateFlags state;
           GtkBorder padding, border;
 
-          state = gtk_widget_get_state_flags (widget);
           gtk_style_context_get_padding (context, state, &padding);
           gtk_style_context_get_border (context, state, &border);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]