[gtk/wip/matthiasc/popup5: 109/118] widget: Optimize resize propagation
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/matthiasc/popup5: 109/118] widget: Optimize resize propagation
- Date: Sun, 5 May 2019 17:48:21 +0000 (UTC)
commit ec009f9fab714d678fe1bf889cca2d424086c7ae
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 695882ba32..689e10c438 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -4082,7 +4082,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]