renderer/native: Clear pending update list before repopulating

Before we did a simple copy, meaning the old list was overriden. Copy
was too eager, as it meant views without modes to set was waited for,
resulting in a dead lock. Instead only the relevant views were added to
the list for view which had pending updates needed. What was missed was
that the list was never cleared, meaning we just appended the new list
on top of the old, causing issues.

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1846
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1843
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1844
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1895>
This commit is contained in:
Jonas Ådahl 2021-06-12 21:09:55 +02:00
parent c3feb83529
commit a0343b0abd

View File

@ -831,7 +831,7 @@ meta_renderer_native_queue_modes_reset (MetaRendererNative *renderer_native)
MetaRenderer *renderer = META_RENDERER (renderer_native);
GList *l;
g_list_free (renderer_native->pending_mode_set_views);
g_clear_list (&renderer_native->pending_mode_set_views, NULL);
for (l = meta_renderer_get_views (renderer); l; l = l->next)
{
ClutterStageView *stage_view = l->data;