diff options
-rw-r--r-- | sway/extensions.c | 10 |
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); |