From: Christian Hergert Date: Sun, 30 Jan 2022 01:04:50 +0000 (-0800) Subject: macos: remove popup surface from parent X-Git-Tag: archive/raspbian/4.6.5+ds-1+rpi1~1^2~19^2~4^2~22^2~14 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=936034e07a1e1585c04736eb81a84823abf677b9;p=gtk4.git macos: remove popup surface from parent --- 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);