mirror of
https://github.com/swaywm/sway.git
synced 2024-11-14 06:24:20 +01:00
sway/input: use wlr_input_device from input device base
This commit is contained in:
parent
f8990523b4
commit
85d1c98476
@ -377,7 +377,7 @@ void handle_virtual_keyboard(struct wl_listener *listener, void *data) {
|
|||||||
struct sway_input_manager *input_manager =
|
struct sway_input_manager *input_manager =
|
||||||
wl_container_of(listener, input_manager, virtual_keyboard_new);
|
wl_container_of(listener, input_manager, virtual_keyboard_new);
|
||||||
struct wlr_virtual_keyboard_v1 *keyboard = data;
|
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
|
// TODO: Amend protocol to allow NULL seat
|
||||||
struct sway_seat *seat = keyboard->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);
|
wl_container_of(listener, input_manager, virtual_pointer_new);
|
||||||
struct wlr_virtual_pointer_v1_new_pointer_event *event = data;
|
struct wlr_virtual_pointer_v1_new_pointer_event *event = data;
|
||||||
struct wlr_virtual_pointer_v1 *pointer = event->new_pointer;
|
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 ?
|
struct sway_seat *seat = event->suggested_seat ?
|
||||||
input_manager_sway_seat_from_wlr_seat(event->suggested_seat) :
|
input_manager_sway_seat_from_wlr_seat(event->suggested_seat) :
|
||||||
|
@ -950,7 +950,7 @@ static void sway_keyboard_group_add(struct sway_keyboard *keyboard) {
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
sway_group->seat_device->input_device->wlr_device =
|
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)) {
|
if (!sway_keyboard_create(seat, sway_group->seat_device)) {
|
||||||
sway_log(SWAY_ERROR, "Failed to allocate sway_keyboard for group");
|
sway_log(SWAY_ERROR, "Failed to allocate sway_keyboard for group");
|
||||||
|
Loading…
Reference in New Issue
Block a user