aboutsummaryrefslogtreecommitdiff
path: root/sway
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2016-02-25 09:02:47 -0500
committerDrew DeVault <sir@cmpwn.com>2016-02-25 09:02:47 -0500
commit28c8e4fb9e6da839d353be723be60bb7bf2ebcdb (patch)
tree3d88b128c31f92043aca94bf1890281174d81251 /sway
parentc9d9dd75161b8f08aa937b8904f529fa05aa92aa (diff)
parent89bb6a4a42a1617675446447416be1156e9c2fbd (diff)
Merge pull request #493 from mikkeloscar/view-behind-swaylock
Don't rearrange views behind swaylock.
Diffstat (limited to 'sway')
-rw-r--r--sway/extensions.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sway/extensions.c b/sway/extensions.c
index 33c66bb7..9596905c 100644
--- a/sway/extensions.c
+++ b/sway/extensions.c
@@ -108,6 +108,16 @@ static void set_lock_surface(struct wl_client *client, struct wl_resource *resou
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) {
+ // make the view floating so it doesn't rearrange other
+ // siblings.
+ if (!view->is_floating) {
+ // Remove view from its current location
+ destroy_container(remove_child(view));
+
+ // and move it into workspace floating
+ add_floating(swayc_active_workspace(), view);
+ }
+
swayc_t *workspace = output->focused;
if (!swayc_is_child_of(view, workspace)) {
move_container_to(view, workspace);