[gtk/wip/matthiasc/context-menu: 25/29] widget: Fix size allocation



commit dde003fa60b00fb17806dba4b8a8ee0a1f2a0e2b
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Jun 11 00:48:27 2019 +0000

    widget: Fix size allocation
    
    We must check-resize the context menu,
    otherwise it will not have a valid
    allocation, and things will go badly.

 gtk/gtkwidget.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index e93e22f975..e3b4214e56 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -4584,6 +4584,9 @@ gtk_widget_allocate (GtkWidget    *widget,
                                                       baseline);
     }
 
+  if (priv->popup_menu)
+    gtk_native_check_resize (GTK_NATIVE (priv->popup_menu));
+
   /* Size allocation is god... after consulting god, no further requests or allocations are needed */
 #ifdef G_ENABLE_DEBUG
   if (GTK_DISPLAY_DEBUG_CHECK (_gtk_widget_get_display (widget), GEOMETRY) &&


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]