wayland/idle-inhibit: Handle actor going away

There were some fixes to how to handle actor going away and being
recreated, but it didn't go all the way. This is the last step that
should have been.

Fixes: a3c62bf8aa ("wayland/idle-inhibit: Add state tracking to fix races")
Related: https://bugzilla.redhat.com/show_bug.cgi?id=2238785
Closes https://gitlab.gnome.org/GNOME/mutter/-/issues/3014

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3277>
This commit is contained in:
Jonas Ådahl 2023-09-13 23:58:23 +08:00 committed by Marge Bot
parent a9c24ff653
commit ec35d74f1f

View File

@ -135,16 +135,14 @@ update_inhibitation (MetaWaylandIdleInhibitor *inhibitor)
return;
if (!inhibitor->surface ||
!inhibitor->resource)
!inhibitor->resource ||
!inhibitor->actor)
{
should_inhibit = FALSE;
}
else
{
MetaSurfaceActor *actor;
actor = meta_wayland_surface_get_actor (inhibitor->surface);
if (meta_surface_actor_is_effectively_obscured (actor))
if (meta_surface_actor_is_effectively_obscured (inhibitor->actor))
should_inhibit = FALSE;
else
should_inhibit = TRUE;