summaryrefslogtreecommitdiffstats
path: root/sway/extensions.c
diff options
context:
space:
mode:
authorLibravatar Mikkel Oscar Lyderik <mikkeloscar@gmail.com>2016-02-25 14:42:48 +0100
committerLibravatar Mikkel Oscar Lyderik <mikkeloscar@gmail.com>2016-02-25 14:42:48 +0100
commit89bb6a4a42a1617675446447416be1156e9c2fbd (patch)
tree3d88b128c31f92043aca94bf1890281174d81251 /sway/extensions.c
parentCheck for empty ws on view destroyed. (diff)
downloadsway-89bb6a4a42a1617675446447416be1156e9c2fbd.tar.gz
sway-89bb6a4a42a1617675446447416be1156e9c2fbd.tar.zst
sway-89bb6a4a42a1617675446447416be1156e9c2fbd.zip
Don't rearrange views behind swaylock.
Fix #481
Diffstat (limited to 'sway/extensions.c')
-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
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 sway_log(L_DEBUG, "Setting lock surface to %p", view);
110 if (view && output) { 110 if (view && output) {
111 // make the view floating so it doesn't rearrange other
112 // siblings.
113 if (!view->is_floating) {
114 // Remove view from its current location
115 destroy_container(remove_child(view));
116
117 // and move it into workspace floating
118 add_floating(swayc_active_workspace(), view);
119 }
120
111 swayc_t *workspace = output->focused; 121 swayc_t *workspace = output->focused;
112 if (!swayc_is_child_of(view, workspace)) { 122 if (!swayc_is_child_of(view, workspace)) {
113 move_container_to(view, workspace); 123 move_container_to(view, workspace);