[gtk/wip/otte/hfw-min-size: 2/4] widget: Clear size request cache on queue_resize()
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/otte/hfw-min-size: 2/4] widget: Clear size request cache on queue_resize()
- Date: Sun, 21 Nov 2021 06:13:00 +0000 (UTC)
commit 822508f33e46947db178ca58a7ec6dcfe29f1dee
Author: Benjamin Otte <otte redhat com>
Date: Sun Nov 21 06:08:06 2021 +0100
widget: Clear size request cache on queue_resize()
... and not later.
Otherwise future calls to sizing fucntions will reuse an outdated cache
and compute wrong values.
gtk/gtkwidget.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 192cc62de3..d6ad33626f 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -3591,6 +3591,7 @@ gtk_widget_queue_resize_internal (GtkWidget *widget)
return;
priv->resize_needed = TRUE;
+ _gtk_size_request_cache_clear (&priv->requests);
gtk_widget_set_alloc_needed (widget);
if (priv->resize_func)
@@ -10602,7 +10603,6 @@ gtk_widget_ensure_resize (GtkWidget *widget)
return;
priv->resize_needed = FALSE;
- _gtk_size_request_cache_clear (&priv->requests);
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]