|
|
@ -4,11 +4,11 @@
|
|
|
|
#include <wlc/wlc-render.h>
|
|
|
|
#include <wlc/wlc-render.h>
|
|
|
|
#include "wayland-desktop-shell-server-protocol.h"
|
|
|
|
#include "wayland-desktop-shell-server-protocol.h"
|
|
|
|
#include "wayland-swaylock-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 "log.h"
|
|
|
|
#include "input_state.h"
|
|
|
|
|
|
|
|
#include "extensions.h"
|
|
|
|
|
|
|
|
#include "ipc-server.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
struct desktop_shell_state desktop_shell;
|
|
|
|
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)) {
|
|
|
|
if (!swayc_is_child_of(view, workspace)) {
|
|
|
|
move_container_to(view, workspace);
|
|
|
|
move_container_to(view, workspace);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// make the view floating so it doesn't rearrange other
|
|
|
|
// make the view floating so it doesn't rearrange other siblings.
|
|
|
|
// siblings.
|
|
|
|
|
|
|
|
if (!view->is_floating) {
|
|
|
|
if (!view->is_floating) {
|
|
|
|
// Remove view from its current location
|
|
|
|
|
|
|
|
destroy_container(remove_child(view));
|
|
|
|
destroy_container(remove_child(view));
|
|
|
|
// and move it into workspace floating
|
|
|
|
|
|
|
|
add_floating(workspace, view);
|
|
|
|
add_floating(workspace, view);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
wlc_view_set_state(view->handle, WLC_BIT_FULLSCREEN, true);
|
|
|
|
wlc_view_set_state(view->handle, WLC_BIT_FULLSCREEN, true);
|
|
|
|
workspace->fullscreen = view;
|
|
|
|
wlc_view_bring_to_front(view->handle);
|
|
|
|
ipc_event_window(view, "fullscreen_mode");
|
|
|
|
wlc_view_focus(view->handle);
|
|
|
|
desktop_shell.is_locked = true;
|
|
|
|
desktop_shell.is_locked = true;
|
|
|
|
// reset input state
|
|
|
|
|
|
|
|
input_init();
|
|
|
|
input_init();
|
|
|
|
// set focus if the lockscreen is spawned on the currently
|
|
|
|
arrange_windows(workspace, -1, -1);
|
|
|
|
// active output
|
|
|
|
|
|
|
|
swayc_t *focus_output = swayc_active_output();
|
|
|
|
swayc_t *focus_output = swayc_active_output();
|
|
|
|
if (focus_output == output) {
|
|
|
|
if (focus_output == output) {
|
|
|
|
set_focused_container(view);
|
|
|
|
set_focused_container(view);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
arrange_windows(workspace, -1, -1);
|
|
|
|
|
|
|
|
list_add(desktop_shell.lock_surfaces, surface);
|
|
|
|
list_add(desktop_shell.lock_surfaces, surface);
|
|
|
|
wl_resource_set_destructor(surface, lock_surface_destructor);
|
|
|
|
wl_resource_set_destructor(surface, lock_surface_destructor);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|