macos: remove popup surface from parent

This commit is contained in:
Christian Hergert 2022-01-29 17:04:50 -08:00
parent ea43939f52
commit 936034e07a

View File

@ -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);