Add support for screenlock protocol

This will always accept lock requests, including replacing a current
locker if present.

Based a prototype by: Manuel Stoeckl <code@mstoeckl.com>
This commit is contained in:
Daniel De Graaf 2021-09-05 15:17:45 -04:00
parent 30c28ff8f7
commit 2b2df8e3d8
8 changed files with 431 additions and 3 deletions

View file

@ -15,6 +15,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_screenlocker_v1.h>
#include <wlr/types/wlr_server_decoration.h>
#include <wlr/types/wlr_text_input_v3.h>
#include <wlr/types/wlr_xdg_shell.h>
@ -85,6 +86,10 @@ struct sway_server {
struct wl_listener output_manager_apply;
struct wl_listener output_manager_test;
struct wlr_screenlock_manager_v1 *screenlock;
struct wlr_texture *permalock_message;
struct wl_listener screenlock_set_mode;
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;
@ -141,6 +146,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 handle_lock_set_mode(struct wl_listener *listener, void *data);
void handle_xdg_shell_surface(struct wl_listener *listener, void *data);
#if HAVE_XWAYLAND
void handle_xwayland_surface(struct wl_listener *listener, void *data);