]> Pileus Git - ~andy/gtk/commitdiff
Avoid invariant checking spew in gnome-shell
authorMatthias Clasen <mclasen@redhat.com>
Wed, 22 Dec 2010 21:53:26 +0000 (16:53 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 22 Dec 2010 21:54:52 +0000 (16:54 -0500)
For normal toplevels, visible is tightly bound to mapped, but for
something like a toplevel that exists within a Clutter stage we
may want to make mapping dependenton external factors, so we shouldn't
actually checked that !mapped toplevels are !visible.

Pointed out by Owen Taylor,

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

gtk/gtkwidget.c

index 66838bcca93649e63353bc1b071a18ee32930329..87834edea6d18e7e8a2c220eeb58cadef731cc3f 100644 (file)
@@ -8669,12 +8669,18 @@ gtk_widget_verify_invariants (GtkWidget *widget)
     {
       /* Not mapped implies... */
 
+#if 0
+  /* This check makes sense for normal toplevels, but for
+   * something like a toplevel that is embedded within a clutter
+   * state, mapping may depend on external factors.
+   */
       if (widget->priv->toplevel)
         {
           if (widget->priv->visible)
             g_warning ("%s %p toplevel is visible but not mapped",
                        G_OBJECT_TYPE_NAME (widget), widget);
         }
+#endif
     }
 
   /* Parent related checks aren't possible if parent has