diff options
author | Aleksa Sarai <cyphar@cyphar.com> | 2016-12-26 19:23:07 +1100 |
---|---|---|
committer | Aleksa Sarai <cyphar@cyphar.com> | 2016-12-26 19:23:07 +1100 |
commit | 29a535aae4ff631aced5753b45ef32a5f1b342dc (patch) | |
tree | f54a9f9a6b34a474b2a87136b8ec45090f7151c6 | |
parent | Update default swaybar command (diff) | |
download | sway-29a535aae4ff631aced5753b45ef32a5f1b342dc.tar.gz sway-29a535aae4ff631aced5753b45ef32a5f1b342dc.tar.zst sway-29a535aae4ff631aced5753b45ef32a5f1b342dc.zip |
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>
-rw-r--r-- | sway/extensions.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sway/extensions.c b/sway/extensions.c index 40702e28..547aa931 100644 --- a/sway/extensions.c +++ b/sway/extensions.c | |||
@@ -65,10 +65,12 @@ void lock_surface_destructor(struct wl_resource *resource) { | |||
65 | if (surface == resource) { | 65 | if (surface == resource) { |
66 | list_del(desktop_shell.lock_surfaces, i); | 66 | list_del(desktop_shell.lock_surfaces, i); |
67 | arrange_windows(&root_container, -1, -1); | 67 | arrange_windows(&root_container, -1, -1); |
68 | desktop_shell.is_locked = false; | ||
69 | break; | 68 | break; |
70 | } | 69 | } |
71 | } | 70 | } |
71 | if (desktop_shell.lock_surfaces->length == 0) { | ||
72 | desktop_shell.is_locked = false; | ||
73 | } | ||
72 | } | 74 | } |
73 | 75 | ||
74 | static void set_background(struct wl_client *client, struct wl_resource *resource, | 76 | static void set_background(struct wl_client *client, struct wl_resource *resource, |