mirror of
https://github.com/swaywm/sway.git
synced 2024-11-05 16:03:11 +00:00
sway: extensions: only unlock if lock_surfaces.length == 0
When destroying lock surfaces, we really should only unlock a desktop_shell if the set of lock surfaces has dropped to zero (since callers need to do a set_lock_surface for every output). Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
This commit is contained in:
parent
36e48fcf8d
commit
29a535aae4
|
@ -65,10 +65,12 @@ void lock_surface_destructor(struct wl_resource *resource) {
|
||||||
if (surface == resource) {
|
if (surface == resource) {
|
||||||
list_del(desktop_shell.lock_surfaces, i);
|
list_del(desktop_shell.lock_surfaces, i);
|
||||||
arrange_windows(&root_container, -1, -1);
|
arrange_windows(&root_container, -1, -1);
|
||||||
desktop_shell.is_locked = false;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (desktop_shell.lock_surfaces->length == 0) {
|
||||||
|
desktop_shell.is_locked = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void set_background(struct wl_client *client, struct wl_resource *resource,
|
static void set_background(struct wl_client *client, struct wl_resource *resource,
|
||||||
|
|
Loading…
Reference in a new issue