diff options
Diffstat (limited to 'sway')
-rw-r--r-- | sway/extensions.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/sway/extensions.c b/sway/extensions.c index 9596905c..eee3a1d8 100644 --- a/sway/extensions.c +++ b/sway/extensions.c | |||
@@ -108,19 +108,17 @@ 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 | swayc_t *workspace = output->focused; | ||
112 | if (!swayc_is_child_of(view, workspace)) { | ||
113 | move_container_to(view, workspace); | ||
114 | } | ||
111 | // make the view floating so it doesn't rearrange other | 115 | // make the view floating so it doesn't rearrange other |
112 | // siblings. | 116 | // siblings. |
113 | if (!view->is_floating) { | 117 | if (!view->is_floating) { |
114 | // Remove view from its current location | 118 | // Remove view from its current location |
115 | destroy_container(remove_child(view)); | 119 | destroy_container(remove_child(view)); |
116 | |||
117 | // and move it into workspace floating | 120 | // and move it into workspace floating |
118 | add_floating(swayc_active_workspace(), view); | 121 | add_floating(workspace, view); |
119 | } | ||
120 | |||
121 | swayc_t *workspace = output->focused; | ||
122 | if (!swayc_is_child_of(view, workspace)) { | ||
123 | move_container_to(view, workspace); | ||
124 | } | 122 | } |
125 | wlc_view_set_state(view->handle, WLC_BIT_FULLSCREEN, true); | 123 | wlc_view_set_state(view->handle, WLC_BIT_FULLSCREEN, true); |
126 | workspace->fullscreen = view; | 124 | workspace->fullscreen = view; |