diff options
author | Simon Zeni <simon@bl4ckb0ne.ca> | 2022-02-09 16:20:39 -0500 |
---|---|---|
committer | Kirill Primak <vyivel@eclair.cafe> | 2022-02-21 20:25:47 +0300 |
commit | 85d1c98476b653368e9a9f41650eb6e2f6aac596 (patch) | |
tree | fbeff8e7914ffe8ec4a4266a2e4578e8d16590a2 | |
parent | sway/commands: add missing wlr_keyboard interface include in xkb_switch_layout (diff) | |
download | sway-85d1c98476b653368e9a9f41650eb6e2f6aac596.tar.gz sway-85d1c98476b653368e9a9f41650eb6e2f6aac596.tar.zst sway-85d1c98476b653368e9a9f41650eb6e2f6aac596.zip |
sway/input: use wlr_input_device from input device base
-rw-r--r-- | sway/input/input-manager.c | 4 | ||||
-rw-r--r-- | sway/input/keyboard.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/sway/input/input-manager.c b/sway/input/input-manager.c index f04a8ce0..8538d97c 100644 --- a/sway/input/input-manager.c +++ b/sway/input/input-manager.c | |||
@@ -377,7 +377,7 @@ void handle_virtual_keyboard(struct wl_listener *listener, void *data) { | |||
377 | struct sway_input_manager *input_manager = | 377 | struct sway_input_manager *input_manager = |
378 | wl_container_of(listener, input_manager, virtual_keyboard_new); | 378 | wl_container_of(listener, input_manager, virtual_keyboard_new); |
379 | struct wlr_virtual_keyboard_v1 *keyboard = data; | 379 | struct wlr_virtual_keyboard_v1 *keyboard = data; |
380 | struct wlr_input_device *device = &keyboard->input_device; | 380 | struct wlr_input_device *device = &keyboard->keyboard.base; |
381 | 381 | ||
382 | // TODO: Amend protocol to allow NULL seat | 382 | // TODO: Amend protocol to allow NULL seat |
383 | struct sway_seat *seat = keyboard->seat ? | 383 | struct sway_seat *seat = keyboard->seat ? |
@@ -410,7 +410,7 @@ void handle_virtual_pointer(struct wl_listener *listener, void *data) { | |||
410 | wl_container_of(listener, input_manager, virtual_pointer_new); | 410 | wl_container_of(listener, input_manager, virtual_pointer_new); |
411 | struct wlr_virtual_pointer_v1_new_pointer_event *event = data; | 411 | struct wlr_virtual_pointer_v1_new_pointer_event *event = data; |
412 | struct wlr_virtual_pointer_v1 *pointer = event->new_pointer; | 412 | struct wlr_virtual_pointer_v1 *pointer = event->new_pointer; |
413 | struct wlr_input_device *device = &pointer->input_device; | 413 | struct wlr_input_device *device = &pointer->pointer.base; |
414 | 414 | ||
415 | struct sway_seat *seat = event->suggested_seat ? | 415 | struct sway_seat *seat = event->suggested_seat ? |
416 | input_manager_sway_seat_from_wlr_seat(event->suggested_seat) : | 416 | input_manager_sway_seat_from_wlr_seat(event->suggested_seat) : |
diff --git a/sway/input/keyboard.c b/sway/input/keyboard.c index f258ac7d..b853e391 100644 --- a/sway/input/keyboard.c +++ b/sway/input/keyboard.c | |||
@@ -950,7 +950,7 @@ static void sway_keyboard_group_add(struct sway_keyboard *keyboard) { | |||
950 | goto cleanup; | 950 | goto cleanup; |
951 | } | 951 | } |
952 | sway_group->seat_device->input_device->wlr_device = | 952 | sway_group->seat_device->input_device->wlr_device = |
953 | sway_group->wlr_group->input_device; | 953 | &sway_group->wlr_group->keyboard.base; |
954 | 954 | ||
955 | if (!sway_keyboard_create(seat, sway_group->seat_device)) { | 955 | if (!sway_keyboard_create(seat, sway_group->seat_device)) { |
956 | sway_log(SWAY_ERROR, "Failed to allocate sway_keyboard for group"); | 956 | sway_log(SWAY_ERROR, "Failed to allocate sway_keyboard for group"); |