[gtk/wip/chergert/macos-fixes: 2/4] macos: remove popup surface from parent




commit 38ee0ff483b807d0d91e6d938aad778a2fb010b4
Author: Christian Hergert <christian hergert me>
Date:   Sat Jan 29 17:04:50 2022 -0800

    macos: remove popup surface from parent

 gdk/macos/gdkmacospopupsurface.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/gdk/macos/gdkmacospopupsurface.c b/gdk/macos/gdkmacospopupsurface.c
index 6f79b6d31b..477961503f 100644
--- a/gdk/macos/gdkmacospopupsurface.c
+++ b/gdk/macos/gdkmacospopupsurface.c
@@ -204,6 +204,10 @@ static void
 _gdk_macos_popup_surface_finalize (GObject *object)
 {
   GdkMacosPopupSurface *self = (GdkMacosPopupSurface *)object;
+  GdkSurface *parent = GDK_SURFACE (self)->parent;
+
+  if (parent != NULL)
+    parent->children = g_list_remove (parent->children, self);
 
   g_clear_object (&GDK_SURFACE (self)->parent);
   g_clear_pointer (&self->layout, gdk_popup_layout_unref);


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