[gtk/wip/matthiasc/popup: 17/18] widget: Check rootness for invisibility
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/matthiasc/popup: 17/18] widget: Check rootness for invisibility
- Date: Mon, 25 Feb 2019 00:42:55 +0000 (UTC)
commit 5bbeba3558258d8cd29f1b89f3135859119b606b
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 9f61ec5448..eae8dde54e 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"
@@ -12083,7 +12084,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]