wayland/idle-inhibit: Handle NULL inhibitor->actor
Fixes: a3c62bf8aa
("wayland/idle-inhibit: Add state tracking to fix races")
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3444>
This commit is contained in:
parent
dfe4d218f1
commit
212283c13b
@ -291,6 +291,9 @@ static void
|
||||
attach_actor (MetaWaylandIdleInhibitor *inhibitor)
|
||||
{
|
||||
inhibitor->actor = meta_wayland_surface_get_actor (inhibitor->surface);
|
||||
|
||||
if (inhibitor->actor)
|
||||
{
|
||||
inhibitor->is_obscured_changed_handler =
|
||||
g_signal_connect (inhibitor->actor, "notify::is-obscured",
|
||||
G_CALLBACK (is_obscured_changed), inhibitor);
|
||||
@ -298,6 +301,7 @@ attach_actor (MetaWaylandIdleInhibitor *inhibitor)
|
||||
g_signal_connect (inhibitor->actor, "destroy",
|
||||
G_CALLBACK (on_actor_destroyed), inhibitor);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
on_actor_changed (MetaWaylandSurface *surface,
|
||||
|
Loading…
Reference in New Issue
Block a user