[gtk/wip/matthiasc/popup5: 82/151] widget: Optimize resize propagation
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/matthiasc/popup5: 82/151] widget: Optimize resize propagation
- Date: Tue, 28 May 2019 20:35:34 +0000 (UTC)
commit f3559fe0f0442b4ef1e7a207ae847c52d2b3b804
Author: Matthias Clasen <mclasen redhat com>
Date: Sat May 4 18:12:45 2019 +0000
widget: Optimize resize propagation
When a GtkNative widget is marked as resize_needed,
we need a current position for its parent and we need
the parent to be allocated (so we can position our
surface), but we don't need the parent to be marked
as resize_needed, since the parent size is entirely
independent of the popup size.
gtk/gtkwidget.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index aef6886ac2..f385967f44 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -4088,7 +4088,12 @@ gtk_widget_queue_resize_internal (GtkWidget *widget)
{
GtkWidget *parent = _gtk_widget_get_parent (widget);
if (parent)
- gtk_widget_queue_resize_internal (parent);
+ {
+ if (GTK_IS_NATIVE (widget))
+ gtk_widget_queue_allocate (parent);
+ else
+ gtk_widget_queue_resize_internal (parent);
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]