aboutsummaryrefslogtreecommitdiffstats
path: root/sway
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2016-01-26 18:33:50 -0500
committerLibravatar Drew DeVault <sir@cmpwn.com>2016-01-26 18:33:50 -0500
commitf1f4791a3b2da30175b518b531927955283d47c1 (patch)
tree17e3dfb735905bb3ac9e82cfd548200c3ac5e734 /sway
parentMerge pull request #478 from SethBarberee/swaymsg-zsh (diff)
downloadsway-f1f4791a3b2da30175b518b531927955283d47c1.tar.gz
sway-f1f4791a3b2da30175b518b531927955283d47c1.tar.zst
sway-f1f4791a3b2da30175b518b531927955283d47c1.zip
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
106 struct wl_resource *_output, struct wl_resource *surface) { 106 struct wl_resource *_output, struct wl_resource *surface) {
107 swayc_t *output = swayc_by_handle(wlc_handle_from_wl_output_resource(_output)); 107 swayc_t *output = swayc_by_handle(wlc_handle_from_wl_output_resource(_output));
108 swayc_t *view = swayc_by_handle(wlc_handle_from_wl_surface_resource(surface)); 108 swayc_t *view = swayc_by_handle(wlc_handle_from_wl_surface_resource(surface));
109 sway_log(L_DEBUG, "Setting lock surface to %p", view);
109 if (view && output) { 110 if (view && output) {
110 swayc_t *workspace = output->focused; 111 swayc_t *workspace = output->focused;
111 if (!swayc_is_child_of(view, workspace)) { 112 if (!swayc_is_child_of(view, workspace)) {
@@ -116,6 +117,8 @@ static void set_lock_surface(struct wl_client *client, struct wl_resource *resou
116 desktop_shell.is_locked = true; 117 desktop_shell.is_locked = true;
117 set_focused_container(view); 118 set_focused_container(view);
118 arrange_windows(view, -1, -1); 119 arrange_windows(view, -1, -1);
120 list_add(desktop_shell.lock_surfaces, surface);
121 wl_resource_set_destructor(surface, lock_surface_destructor);
119 } else { 122 } else {
120 sway_log(L_ERROR, "Attempted to set lock surface to non-view"); 123 sway_log(L_ERROR, "Attempted to set lock surface to non-view");
121 } 124 }