From c484f13b34dcd4796dd87f5276d2afecc2789671 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Wed, 25 Aug 2021 21:59:52 +0200 Subject: [PATCH] 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: --- clutter/clutter/clutter-stage.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/clutter/clutter/clutter-stage.c b/clutter/clutter/clutter-stage.c index 3b39aeca7..ab171efac 100644 --- a/clutter/clutter/clutter-stage.c +++ b/clutter/clutter/clutter-stage.c @@ -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); }