sway/input: use wlr_input_device from input device base

This commit is contained in:
Simon Zeni 2022-02-09 16:20:39 -05:00 committed by Kirill Primak
parent f8990523b4
commit 85d1c98476
2 changed files with 3 additions and 3 deletions

View File

@ -377,7 +377,7 @@ void handle_virtual_keyboard(struct wl_listener *listener, void *data) {
struct sway_input_manager *input_manager =
wl_container_of(listener, input_manager, virtual_keyboard_new);
struct wlr_virtual_keyboard_v1 *keyboard = data;
struct wlr_input_device *device = &keyboard->input_device;
struct wlr_input_device *device = &keyboard->keyboard.base;
// TODO: Amend protocol to allow NULL seat
struct sway_seat *seat = keyboard->seat ?
@ -410,7 +410,7 @@ void handle_virtual_pointer(struct wl_listener *listener, void *data) {
wl_container_of(listener, input_manager, virtual_pointer_new);
struct wlr_virtual_pointer_v1_new_pointer_event *event = data;
struct wlr_virtual_pointer_v1 *pointer = event->new_pointer;
struct wlr_input_device *device = &pointer->input_device;
struct wlr_input_device *device = &pointer->pointer.base;
struct sway_seat *seat = event->suggested_seat ?
input_manager_sway_seat_from_wlr_seat(event->suggested_seat) :

View File

@ -950,7 +950,7 @@ static void sway_keyboard_group_add(struct sway_keyboard *keyboard) {
goto cleanup;
}
sway_group->seat_device->input_device->wlr_device =
sway_group->wlr_group->input_device;
&sway_group->wlr_group->keyboard.base;
if (!sway_keyboard_create(seat, sway_group->seat_device)) {
sway_log(SWAY_ERROR, "Failed to allocate sway_keyboard for group");