]> Pileus Git - ~andy/gtk/commitdiff
stylecontext: Do invalidation on first resize container master
authorBenjamin Otte <otte@redhat.com>
Fri, 15 Mar 2013 23:05:03 +0000 (00:05 +0100)
committerBenjamin Otte <otte@redhat.com>
Fri, 15 Mar 2013 23:06:55 +0000 (00:06 +0100)
... instead of taking the last one we find. This is necessary as
attached widgets (mostly menus) can be attached to an invisible widget,
but we still want to invalidate styles for them.

https://bugzilla.gnome.org/show_bug.cgi?id=695772

gtk/gtkstylecontext.c

index ad182f2be3967d5ac44995fb347cffe784519cd0..f2c79c8d2e893425e5df7562e0cc2b727ac38fad 100644 (file)
@@ -1071,10 +1071,10 @@ gtk_style_context_set_invalid (GtkStyleContext *context,
 
   if (invalid)
     {
-      if (priv->parent)
-        gtk_style_context_set_invalid (priv->parent, TRUE);
-      else if (GTK_IS_RESIZE_CONTAINER (priv->widget))
+      if (GTK_IS_RESIZE_CONTAINER (priv->widget))
         _gtk_container_queue_restyle (GTK_CONTAINER (priv->widget));
+      else if (priv->parent)
+        gtk_style_context_set_invalid (priv->parent, TRUE);
     }
 }