clutter/stage: Free pointer/touch info early during dispose

If we wait till finalize, dispose will destroy the actor hierarchy
and cause untimely repicks. Ensure to free the pointer/touch info
first, so the hooked signal callbacks are gone when destroying the
actors.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1915>
This commit is contained in:
Carlos Garnacho 2021-08-25 21:59:52 +02:00 committed by Marge Bot
parent a7fc74032e
commit c484f13b34

View File

@ -1196,6 +1196,9 @@ clutter_stage_dispose (GObject *object)
stage_manager = clutter_stage_manager_get_default ();
_clutter_stage_manager_remove_stage (stage_manager, stage);
g_hash_table_remove_all (priv->pointer_devices);
g_hash_table_remove_all (priv->touch_sequences);
G_OBJECT_CLASS (clutter_stage_parent_class)->dispose (object);
}