diff options
author | Zandr Martin <zandrmartin@gmail.com> | 2016-09-02 13:46:19 -0500 |
---|---|---|
committer | Zandr Martin <zandrmartin@gmail.com> | 2016-09-02 13:46:19 -0500 |
commit | 79ffea328c992c5109406771a59a9f016d85970d (patch) | |
tree | 5d965e72127f227ea0a38dc5c6e4fc14e08d9498 /sway/extensions.c | |
parent | b374c35758777f98e5ddbe4b0dc43bd7c80f36d7 (diff) | |
parent | 4e6d7b125895955e3a84583c6d61f3eb2f8a4fe9 (diff) | |
download | sway-79ffea328c992c5109406771a59a9f016d85970d.tar.xz |
Merge branch 'master' of git://github.com/SirCmpwn/sway into commands-refactor
Diffstat (limited to 'sway/extensions.c')
-rw-r--r-- | sway/extensions.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/sway/extensions.c b/sway/extensions.c index 4611f33e..60cd8d41 100644 --- a/sway/extensions.c +++ b/sway/extensions.c @@ -4,11 +4,11 @@ #include <wlc/wlc-render.h> #include "wayland-desktop-shell-server-protocol.h" #include "wayland-swaylock-server-protocol.h" -#include "layout.h" +#include "sway/layout.h" +#include "sway/input_state.h" +#include "sway/extensions.h" +#include "sway/ipc-server.h" #include "log.h" -#include "input_state.h" -#include "extensions.h" -#include "ipc-server.h" struct desktop_shell_state desktop_shell; @@ -119,27 +119,21 @@ static void set_lock_surface(struct wl_client *client, struct wl_resource *resou if (!swayc_is_child_of(view, workspace)) { move_container_to(view, workspace); } - // make the view floating so it doesn't rearrange other - // siblings. + // 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(workspace, view); } wlc_view_set_state(view->handle, WLC_BIT_FULLSCREEN, true); - workspace->fullscreen = view; - ipc_event_window(view, "fullscreen_mode"); + wlc_view_bring_to_front(view->handle); + wlc_view_focus(view->handle); desktop_shell.is_locked = true; - // reset input state input_init(); - // set focus if the lockscreen is spawned on the currently - // active output + arrange_windows(workspace, -1, -1); swayc_t *focus_output = swayc_active_output(); if (focus_output == output) { set_focused_container(view); } - arrange_windows(workspace, -1, -1); list_add(desktop_shell.lock_surfaces, surface); wl_resource_set_destructor(surface, lock_surface_destructor); } else { |