macos: maintain GList element consistency

We need to keep this consistent so that we can look things up
faster in other places. Therefore, just take the hit here and clear
the entire list ensuring prev/next poniters are cleared.
This commit is contained in:
Christian Hergert 2020-12-02 16:51:31 -08:00
parent 2e52386be5
commit e317b9be00

View File

@ -1056,9 +1056,8 @@ _gdk_macos_display_clear_sorting (GdkMacosDisplay *self)
{
g_return_if_fail (GDK_IS_MACOS_DISPLAY (self));
self->sorted_surfaces.head = NULL;
self->sorted_surfaces.tail = NULL;
self->sorted_surfaces.length = 0;
while (self->sorted_surfaces.head != NULL)
g_queue_unlink (&self->sorted_surfaces, self->sorted_surfaces.head);
}
const GList *