aboutsummaryrefslogtreecommitdiff
path: root/sway
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2016-01-26 18:33:50 -0500
committerDrew DeVault <sir@cmpwn.com>2016-01-26 18:33:50 -0500
commitf1f4791a3b2da30175b518b531927955283d47c1 (patch)
tree17e3dfb735905bb3ac9e82cfd548200c3ac5e734 /sway
parenta97b325b26d64db1ca695c58fa729797f1a1e0a0 (diff)
downloadsway-f1f4791a3b2da30175b518b531927955283d47c1.tar.xz
Fix returning to sway after swaylock completes
Diffstat (limited to 'sway')
-rw-r--r--sway/extensions.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sway/extensions.c b/sway/extensions.c
index 00a72a80..33c66bb7 100644
--- a/sway/extensions.c
+++ b/sway/extensions.c
@@ -106,6 +106,7 @@ static void set_lock_surface(struct wl_client *client, struct wl_resource *resou
struct wl_resource *_output, struct wl_resource *surface) {
swayc_t *output = swayc_by_handle(wlc_handle_from_wl_output_resource(_output));
swayc_t *view = swayc_by_handle(wlc_handle_from_wl_surface_resource(surface));
+ sway_log(L_DEBUG, "Setting lock surface to %p", view);
if (view && output) {
swayc_t *workspace = output->focused;
if (!swayc_is_child_of(view, workspace)) {
@@ -116,6 +117,8 @@ static void set_lock_surface(struct wl_client *client, struct wl_resource *resou
desktop_shell.is_locked = true;
set_focused_container(view);
arrange_windows(view, -1, -1);
+ list_add(desktop_shell.lock_surfaces, surface);
+ wl_resource_set_destructor(surface, lock_surface_destructor);
} else {
sway_log(L_ERROR, "Attempted to set lock surface to non-view");
}