Skip to content

clutter: Bail out and warn on reentry into mapping/unmapping cycle

Jonas Dreßler requested to merge verdre/mutter:catch-mapped-reentry into main

There's a bunch of crashes right now where the assertions in clutter_actor_set_mapped() after calling the map/unmap() vfuncs are failing. The only way this can happen is by re-entering clutter_actor_set_mapped() during the map/unmap recursion.

The reason for those crashes is that the shell hides/shows some actors in response to crossing events and key-focus changes. These in turn get triggered by the newly introduced ungrabbing of ClutterGrabs when an actor gets unmapped, which triggers GRAB_NOTIFY crossing events and key-focus changes.

Since these situations are hardly avoidable (it's a valid use-case to hide/show something in response to a crossing/key-focus event), catch the set_mapped() call early while we reenter the mapping machinery and log a warning instead of crashing.

Fixes: gnome-shell#3165 (closed)

Edited by Jonas Dreßler

Merge request reports