[gtk/wip/otte/for-master] popover: Do not validate the css node on show()
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/otte/for-master] popover: Do not validate the css node on show()
- Date: Tue, 28 Jan 2020 16:29:09 +0000 (UTC)
commit 17ca95a1617b009a76b27a8572671855435985e7
Author: Benjamin Otte <otte redhat com>
Date: Tue Jan 28 17:15:04 2020 +0100
popover: Do not validate the css node on show()
This was a good idea back in GTK3 when popovers were toplevels, but now
they're regular child widgets, so they should behave that way.
Also, with the introduction of the bloom filter, gtk_css_node_validate()
now assumes it's only called on root nodes, so assert that that is the
case.
gtk/gtkcssnode.c | 2 ++
gtk/gtkpopover.c | 1 -
2 files changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkcssnode.c b/gtk/gtkcssnode.c
index ab52c2bcd3..ebc65a8d43 100644
--- a/gtk/gtkcssnode.c
+++ b/gtk/gtkcssnode.c
@@ -1353,6 +1353,8 @@ gtk_css_node_validate (GtkCssNode *cssnode)
gint64 timestamp;
gint64 before = g_get_monotonic_time ();
+ g_assert (cssnode->parent == NULL);
+
timestamp = gtk_css_node_get_timestamp (cssnode);
gtk_css_node_validate_internal (cssnode, &filter, timestamp);
diff --git a/gtk/gtkpopover.c b/gtk/gtkpopover.c
index 168a51a892..752c8b9777 100644
--- a/gtk/gtkpopover.c
+++ b/gtk/gtkpopover.c
@@ -647,7 +647,6 @@ gtk_popover_show (GtkWidget *widget)
GtkPopoverPrivate *priv = gtk_popover_get_instance_private (popover);
_gtk_widget_set_visible_flag (widget, TRUE);
- gtk_css_node_validate (gtk_widget_get_css_node (widget));
gtk_widget_realize (widget);
gtk_popover_native_check_resize (GTK_NATIVE (widget));
gtk_widget_map (widget);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]