diff options
author | llyyr <llyyr.public@gmail.com> | 2023-11-22 00:05:03 +0530 |
---|---|---|
committer | Kirill Primak <vyivel@eclair.cafe> | 2023-11-22 00:42:55 +0300 |
commit | a946b1aecfa3f32a3bfae66d66df0bdf77440d69 (patch) | |
tree | 08a09b61e0ae2ab7de4197f9961c998b0aa69fc6 /sway/input/input-manager.c | |
parent | meson: bump wlroots version after 0.17.0 release (diff) | |
download | sway-a946b1aecfa3f32a3bfae66d66df0bdf77440d69.tar.gz sway-a946b1aecfa3f32a3bfae66d66df0bdf77440d69.tar.zst sway-a946b1aecfa3f32a3bfae66d66df0bdf77440d69.zip |
Chase wlroots!4440
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4440
Diffstat (limited to 'sway/input/input-manager.c')
-rw-r--r-- | sway/input/input-manager.c | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/sway/input/input-manager.c b/sway/input/input-manager.c index dcaeb056..4febc333 100644 --- a/sway/input/input-manager.c +++ b/sway/input/input-manager.c | |||
@@ -6,7 +6,6 @@ | |||
6 | #include <wlr/config.h> | 6 | #include <wlr/config.h> |
7 | #include <wlr/types/wlr_cursor.h> | 7 | #include <wlr/types/wlr_cursor.h> |
8 | #include <wlr/types/wlr_keyboard_group.h> | 8 | #include <wlr/types/wlr_keyboard_group.h> |
9 | #include <wlr/types/wlr_input_inhibitor.h> | ||
10 | #include <wlr/types/wlr_virtual_keyboard_v1.h> | 9 | #include <wlr/types/wlr_virtual_keyboard_v1.h> |
11 | #include <wlr/types/wlr_virtual_pointer_v1.h> | 10 | #include <wlr/types/wlr_virtual_pointer_v1.h> |
12 | #include "sway/config.h" | 11 | #include "sway/config.h" |
@@ -284,34 +283,6 @@ static void handle_new_input(struct wl_listener *listener, void *data) { | |||
284 | } | 283 | } |
285 | } | 284 | } |
286 | 285 | ||
287 | static void handle_inhibit_activate(struct wl_listener *listener, void *data) { | ||
288 | struct sway_input_manager *input_manager = wl_container_of( | ||
289 | listener, input_manager, inhibit_activate); | ||
290 | struct sway_seat *seat; | ||
291 | wl_list_for_each(seat, &input_manager->seats, link) { | ||
292 | seat_set_exclusive_client(seat, input_manager->inhibit->active_client); | ||
293 | } | ||
294 | } | ||
295 | |||
296 | static void handle_inhibit_deactivate(struct wl_listener *listener, void *data) { | ||
297 | struct sway_input_manager *input_manager = wl_container_of( | ||
298 | listener, input_manager, inhibit_deactivate); | ||
299 | struct sway_seat *seat; | ||
300 | if (server.session_lock.locked) { | ||
301 | // Don't deactivate the grab of a screenlocker | ||
302 | return; | ||
303 | } | ||
304 | wl_list_for_each(seat, &input_manager->seats, link) { | ||
305 | seat_set_exclusive_client(seat, NULL); | ||
306 | struct sway_node *previous = seat_get_focus(seat); | ||
307 | if (previous) { | ||
308 | // Hack to get seat to re-focus the return value of get_focus | ||
309 | seat_set_focus(seat, NULL); | ||
310 | seat_set_focus(seat, previous); | ||
311 | } | ||
312 | } | ||
313 | } | ||
314 | |||
315 | static void handle_keyboard_shortcuts_inhibitor_destroy( | 286 | static void handle_keyboard_shortcuts_inhibitor_destroy( |
316 | struct wl_listener *listener, void *data) { | 287 | struct wl_listener *listener, void *data) { |
317 | struct sway_keyboard_shortcuts_inhibitor *sway_inhibitor = | 288 | struct sway_keyboard_shortcuts_inhibitor *sway_inhibitor = |
@@ -480,14 +451,6 @@ struct sway_input_manager *input_manager_create(struct sway_server *server) { | |||
480 | &input->virtual_pointer_new); | 451 | &input->virtual_pointer_new); |
481 | input->virtual_pointer_new.notify = handle_virtual_pointer; | 452 | input->virtual_pointer_new.notify = handle_virtual_pointer; |
482 | 453 | ||
483 | input->inhibit = wlr_input_inhibit_manager_create(server->wl_display); | ||
484 | input->inhibit_activate.notify = handle_inhibit_activate; | ||
485 | wl_signal_add(&input->inhibit->events.activate, | ||
486 | &input->inhibit_activate); | ||
487 | input->inhibit_deactivate.notify = handle_inhibit_deactivate; | ||
488 | wl_signal_add(&input->inhibit->events.deactivate, | ||
489 | &input->inhibit_deactivate); | ||
490 | |||
491 | input->keyboard_shortcuts_inhibit = | 454 | input->keyboard_shortcuts_inhibit = |
492 | wlr_keyboard_shortcuts_inhibit_v1_create(server->wl_display); | 455 | wlr_keyboard_shortcuts_inhibit_v1_create(server->wl_display); |
493 | input->keyboard_shortcuts_inhibit_new_inhibitor.notify = | 456 | input->keyboard_shortcuts_inhibit_new_inhibitor.notify = |