mirror of
https://github.com/brl/mutter.git
synced 2024-12-26 12:52:14 +00:00
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,12 +291,16 @@ static void
|
||||
attach_actor (MetaWaylandIdleInhibitor *inhibitor)
|
||||
{
|
||||
inhibitor->actor = meta_wayland_surface_get_actor (inhibitor->surface);
|
||||
inhibitor->is_obscured_changed_handler =
|
||||
g_signal_connect (inhibitor->actor, "notify::is-obscured",
|
||||
G_CALLBACK (is_obscured_changed), inhibitor);
|
||||
inhibitor->actor_destroyed_handler_id =
|
||||
g_signal_connect (inhibitor->actor, "destroy",
|
||||
G_CALLBACK (on_actor_destroyed), inhibitor);
|
||||
|
||||
if (inhibitor->actor)
|
||||
{
|
||||
inhibitor->is_obscured_changed_handler =
|
||||
g_signal_connect (inhibitor->actor, "notify::is-obscured",
|
||||
G_CALLBACK (is_obscured_changed), inhibitor);
|
||||
inhibitor->actor_destroyed_handler_id =
|
||||
g_signal_connect (inhibitor->actor, "destroy",
|
||||
G_CALLBACK (on_actor_destroyed), inhibitor);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user