aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLibravatar Daniel De Graaf <code@danieldg.net>2022-03-08 21:14:26 -0500
committerLibravatar Simon Ser <contact@emersion.fr>2022-04-29 09:06:36 +0200
commit519038a7e903caae731007b276f5666a341498e9 (patch)
treeb62cb6728503c5e0940c08bb8cb30b81aab9e830 /include
parentxkb_switch_layout: fix relative layout switches (diff)
downloadsway-519038a7e903caae731007b276f5666a341498e9.tar.gz
sway-519038a7e903caae731007b276f5666a341498e9.tar.zst
sway-519038a7e903caae731007b276f5666a341498e9.zip
Implement ext-session-lock-v1
Diffstat (limited to 'include')
-rw-r--r--include/sway/input/seat.h4
-rw-r--r--include/sway/server.h15
2 files changed, 19 insertions, 0 deletions
diff --git a/include/sway/input/seat.h b/include/sway/input/seat.h
index 50c4be9b..47726159 100644
--- a/include/sway/input/seat.h
+++ b/include/sway/input/seat.h
@@ -185,6 +185,10 @@ struct sway_workspace *seat_get_last_known_workspace(struct sway_seat *seat);
185 185
186struct sway_container *seat_get_focused_container(struct sway_seat *seat); 186struct sway_container *seat_get_focused_container(struct sway_seat *seat);
187 187
188// Force focus to a particular surface that is not part of the workspace
189// hierarchy (used for lockscreen)
190void sway_force_focus(struct wlr_surface *surface);
191
188/** 192/**
189 * Return the last container to be focused for the seat (or the most recently 193 * Return the last container to be focused for the seat (or the most recently
190 * opened if no container has received focused) that is a child of the given 194 * opened if no container has received focused) that is a child of the given
diff --git a/include/sway/server.h b/include/sway/server.h
index 0bd860b2..d8ccd64f 100644
--- a/include/sway/server.h
+++ b/include/sway/server.h
@@ -16,6 +16,7 @@
16#include <wlr/types/wlr_output_power_management_v1.h> 16#include <wlr/types/wlr_output_power_management_v1.h>
17#include <wlr/types/wlr_presentation_time.h> 17#include <wlr/types/wlr_presentation_time.h>
18#include <wlr/types/wlr_relative_pointer_v1.h> 18#include <wlr/types/wlr_relative_pointer_v1.h>
19#include <wlr/types/wlr_session_lock_v1.h>
19#include <wlr/types/wlr_server_decoration.h> 20#include <wlr/types/wlr_server_decoration.h>
20#include <wlr/types/wlr_text_input_v3.h> 21#include <wlr/types/wlr_text_input_v3.h>
21#include <wlr/types/wlr_xdg_shell.h> 22#include <wlr/types/wlr_xdg_shell.h>
@@ -89,6 +90,19 @@ struct sway_server {
89 struct wl_listener output_manager_apply; 90 struct wl_listener output_manager_apply;
90 struct wl_listener output_manager_test; 91 struct wl_listener output_manager_test;
91 92
93 struct {
94 bool locked;
95 struct wlr_session_lock_manager_v1 *manager;
96
97 struct wlr_session_lock_v1 *lock;
98 struct wl_listener lock_new_surface;
99 struct wl_listener lock_unlock;
100 struct wl_listener lock_destroy;
101
102 struct wl_listener new_lock;
103 struct wl_listener manager_destroy;
104 } session_lock;
105
92 struct wlr_output_power_manager_v1 *output_power_manager_v1; 106 struct wlr_output_power_manager_v1 *output_power_manager_v1;
93 struct wl_listener output_power_manager_set_mode; 107 struct wl_listener output_power_manager_set_mode;
94 struct wlr_input_method_manager_v2 *input_method; 108 struct wlr_input_method_manager_v2 *input_method;
@@ -148,6 +162,7 @@ void handle_new_output(struct wl_listener *listener, void *data);
148 162
149void handle_idle_inhibitor_v1(struct wl_listener *listener, void *data); 163void handle_idle_inhibitor_v1(struct wl_listener *listener, void *data);
150void handle_layer_shell_surface(struct wl_listener *listener, void *data); 164void handle_layer_shell_surface(struct wl_listener *listener, void *data);
165void sway_session_lock_init(void);
151void handle_xdg_shell_surface(struct wl_listener *listener, void *data); 166void handle_xdg_shell_surface(struct wl_listener *listener, void *data);
152#if HAVE_XWAYLAND 167#if HAVE_XWAYLAND
153void handle_xwayland_surface(struct wl_listener *listener, void *data); 168void handle_xwayland_surface(struct wl_listener *listener, void *data);