[gtk] widget: Check rootness for invisibility



commit 7ca528b896061436ba107aa1d5d69770c7adbcdd
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Feb 24 08:19:05 2019 -0500

    widget: Check rootness for invisibility
    
    Make the function that determines initial visibility
    look at whether the class implements GtkRoot. That is
    the eventual goal for this check. For now, allow
    popovers in here as well.

 gtk/gtkwidget.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 81a231a1dd..cb37b01ff2 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -12087,7 +12087,7 @@ gtk_widget_class_set_css_name (GtkWidgetClass *widget_class,
 static gboolean
 gtk_widget_class_get_visible_by_default (GtkWidgetClass *widget_class)
 {
-  return !(GTK_IS_WINDOW_CLASS (widget_class) ||
+  return !(g_type_is_a (G_TYPE_FROM_CLASS (widget_class), GTK_TYPE_ROOT) ||
            GTK_IS_POPOVER_CLASS (widget_class));
 }
 


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