diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/sway/input/seat.h | 4 | ||||
-rw-r--r-- | include/sway/server.h | 15 |
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); struct sway_container *seat_get_focused_container(struct sway_seat *seat); +// Force focus to a particular surface that is not part of the workspace +// hierarchy (used for lockscreen) +void sway_force_focus(struct wlr_surface *surface); + /** * Return the last container to be focused for the seat (or the most recently * 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 @@ #include <wlr/types/wlr_output_power_management_v1.h> #include <wlr/types/wlr_presentation_time.h> #include <wlr/types/wlr_relative_pointer_v1.h> +#include <wlr/types/wlr_session_lock_v1.h> #include <wlr/types/wlr_server_decoration.h> #include <wlr/types/wlr_text_input_v3.h> #include <wlr/types/wlr_xdg_shell.h> @@ -89,6 +90,19 @@ struct sway_server { struct wl_listener output_manager_apply; struct wl_listener output_manager_test; + struct { + bool locked; + struct wlr_session_lock_manager_v1 *manager; + + struct wlr_session_lock_v1 *lock; + struct wl_listener lock_new_surface; + struct wl_listener lock_unlock; + struct wl_listener lock_destroy; + + struct wl_listener new_lock; + struct wl_listener manager_destroy; + } session_lock; + struct wlr_output_power_manager_v1 *output_power_manager_v1; struct wl_listener output_power_manager_set_mode; struct wlr_input_method_manager_v2 *input_method; @@ -148,6 +162,7 @@ void handle_new_output(struct wl_listener *listener, void *data); void handle_idle_inhibitor_v1(struct wl_listener *listener, void *data); void handle_layer_shell_surface(struct wl_listener *listener, void *data); +void sway_session_lock_init(void); void handle_xdg_shell_surface(struct wl_listener *listener, void *data); #if HAVE_XWAYLAND void handle_xwayland_surface(struct wl_listener *listener, void *data); |