window: Guard can_ping() against unmanaging windows

We remove pending pings when unmanaging a window, but currently
don't prevent new pings to be scheduled after that.

The previous commit fixed a code path where this did indeed happen,
but as the result of gnome-shell trying to attach a Clutter actor
to a non-existent window actor is pretty bad, also guard can_ping()
against being called for an unmanaging window.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2467

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1676>
This commit is contained in:
Florian Müllner 2021-01-20 11:55:10 +01:00 committed by Marge Bot
parent e7b58c23b8
commit 81f3694804

View File

@ -8620,6 +8620,8 @@ meta_window_is_focusable (MetaWindow *window)
gboolean gboolean
meta_window_can_ping (MetaWindow *window) meta_window_can_ping (MetaWindow *window)
{ {
g_return_val_if_fail (!window->unmanaging, FALSE);
return META_WINDOW_GET_CLASS (window)->can_ping (window); return META_WINDOW_GET_CLASS (window)->can_ping (window);
} }