[gtk/wip/matthiasc/popup: 38/63] widget: Check rootness for invisibility



commit 13382618d81280c58b52cc2138af4e152868ef52
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 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index d7dff52e7a..edda67764f 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -52,6 +52,7 @@
 #include "gtkmarshalers.h"
 #include "gtkmenu.h"
 #include "gtkpopover.h"
+#include "gtkpopup.h"
 #include "gtkprivate.h"
 #include "gtkrenderbackgroundprivate.h"
 #include "gtkrenderborderprivate.h"
@@ -11935,7 +11936,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]