Skip to content

[42] wayland: Add destruction listener to activation token surface

Jonas Ådahl requested to merge cherry-pick-ed516dde into gnome-42

In the timespan between an activation token being created and the token being used by the activated application, the surface that started the activation request may end up destroyed/disposed.

In that case, the token would be left with a stale surface pointer, maybe causing crashes later on. Set up a destroy notification listener so that we do know to unset the token surface if that situation arises, this will result in Mutter not considering the token activatable, thus maybe issuing the "Application needs attention" notification if the activated surface did not immediately get focus. In any case this is better than a compositor crash.

A typical situation where this may happen is "Open With..." dialogs, since those don't live long after launching the application.

Fixes: #2390 (closed) Part-of: !2592 (merged)

(cherry picked from commit ed516dde)

Merge request reports