From 936034e07a1e1585c04736eb81a84823abf677b9 Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Sat, 29 Jan 2022 17:04:50 -0800 Subject: [PATCH] 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); -- 2.30.2