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); | |||
185 | 185 | ||
186 | struct sway_container *seat_get_focused_container(struct sway_seat *seat); | 186 | struct 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) | ||
190 | void 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 | ||
149 | void handle_idle_inhibitor_v1(struct wl_listener *listener, void *data); | 163 | void handle_idle_inhibitor_v1(struct wl_listener *listener, void *data); |
150 | void handle_layer_shell_surface(struct wl_listener *listener, void *data); | 164 | void handle_layer_shell_surface(struct wl_listener *listener, void *data); |
165 | void sway_session_lock_init(void); | ||
151 | void handle_xdg_shell_surface(struct wl_listener *listener, void *data); | 166 | void handle_xdg_shell_surface(struct wl_listener *listener, void *data); |
152 | #if HAVE_XWAYLAND | 167 | #if HAVE_XWAYLAND |
153 | void handle_xwayland_surface(struct wl_listener *listener, void *data); | 168 | void handle_xwayland_surface(struct wl_listener *listener, void *data); |