[gtk+] window: Don't pass wrong state to context



commit e1182ec0e1ee09d2995011ccfbb88359187b862c
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Nov 6 22:47:16 2015 -0500

    window: Don't pass wrong state to context
    
    GtkStyleContext warns nowadays if one queries properties
    from a different state. So, don't do that.

 gtk/gtkwindow.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 59a1f97..9c4fcb2 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -6822,16 +6822,14 @@ update_border_windows (GtkWindow *window)
   GtkBorder border;
   GtkBorder window_border;
   GtkStyleContext *context;
-  GtkStateFlags state;
 
   if (!priv->client_decorated)
     return;
 
-  state = _gtk_widget_get_state_flags (widget);
   context = _gtk_widget_get_style_context (widget);
 
   gtk_style_context_save_to_node (context, priv->decoration_node);
-  gtk_style_context_get_margin (context, state, &border);
+  gtk_style_context_get_margin (context, gtk_style_context_get_state (context), &border);
   gtk_widget_style_get (widget,
                         "decoration-resize-handle", &handle,
                         NULL);


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