diff options
Diffstat (limited to 'sway/extensions.c')
-rw-r--r-- | sway/extensions.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/sway/extensions.c b/sway/extensions.c index 70ec537d..60cd8d41 100644 --- a/sway/extensions.c +++ b/sway/extensions.c | |||
@@ -119,27 +119,21 @@ static void set_lock_surface(struct wl_client *client, struct wl_resource *resou | |||
119 | if (!swayc_is_child_of(view, workspace)) { | 119 | if (!swayc_is_child_of(view, workspace)) { |
120 | move_container_to(view, workspace); | 120 | move_container_to(view, workspace); |
121 | } | 121 | } |
122 | // make the view floating so it doesn't rearrange other | 122 | // make the view floating so it doesn't rearrange other siblings. |
123 | // siblings. | ||
124 | if (!view->is_floating) { | 123 | if (!view->is_floating) { |
125 | // Remove view from its current location | ||
126 | destroy_container(remove_child(view)); | 124 | destroy_container(remove_child(view)); |
127 | // and move it into workspace floating | ||
128 | add_floating(workspace, view); | 125 | add_floating(workspace, view); |
129 | } | 126 | } |
130 | wlc_view_set_state(view->handle, WLC_BIT_FULLSCREEN, true); | 127 | wlc_view_set_state(view->handle, WLC_BIT_FULLSCREEN, true); |
131 | workspace->fullscreen = view; | 128 | wlc_view_bring_to_front(view->handle); |
132 | ipc_event_window(view, "fullscreen_mode"); | 129 | wlc_view_focus(view->handle); |
133 | desktop_shell.is_locked = true; | 130 | desktop_shell.is_locked = true; |
134 | // reset input state | ||
135 | input_init(); | 131 | input_init(); |
136 | // set focus if the lockscreen is spawned on the currently | 132 | arrange_windows(workspace, -1, -1); |
137 | // active output | ||
138 | swayc_t *focus_output = swayc_active_output(); | 133 | swayc_t *focus_output = swayc_active_output(); |
139 | if (focus_output == output) { | 134 | if (focus_output == output) { |
140 | set_focused_container(view); | 135 | set_focused_container(view); |
141 | } | 136 | } |
142 | arrange_windows(workspace, -1, -1); | ||
143 | list_add(desktop_shell.lock_surfaces, surface); | 137 | list_add(desktop_shell.lock_surfaces, surface); |
144 | wl_resource_set_destructor(surface, lock_surface_destructor); | 138 | wl_resource_set_destructor(surface, lock_surface_destructor); |
145 | } else { | 139 | } else { |