diff options
Diffstat (limited to 'backend/libinput')
-rw-r--r-- | backend/libinput/backend.c | 12 | ||||
-rw-r--r-- | backend/libinput/events.c | 18 |
2 files changed, 18 insertions, 12 deletions
diff --git a/backend/libinput/backend.c b/backend/libinput/backend.c index 60f456cc..f47121db 100644 --- a/backend/libinput/backend.c +++ b/backend/libinput/backend.c @@ -228,22 +228,22 @@ struct libinput_device *wlr_libinput_get_device_handle( struct wlr_libinput_input_device *dev = NULL; switch (wlr_dev->type) { case WLR_INPUT_DEVICE_KEYBOARD: - dev = device_from_keyboard(wlr_dev->keyboard); + dev = device_from_keyboard(wlr_keyboard_from_input_device(wlr_dev)); break; case WLR_INPUT_DEVICE_POINTER: - dev = device_from_pointer(wlr_dev->pointer); + dev = device_from_pointer(wlr_pointer_from_input_device(wlr_dev)); break; case WLR_INPUT_DEVICE_SWITCH: - dev = device_from_switch(wlr_dev->switch_device); + dev = device_from_switch(wlr_switch_from_input_device(wlr_dev)); break; case WLR_INPUT_DEVICE_TOUCH: - dev = device_from_touch(wlr_dev->touch); + dev = device_from_touch(wlr_touch_from_input_device(wlr_dev)); break; case WLR_INPUT_DEVICE_TABLET_TOOL: - dev = device_from_tablet(wlr_dev->tablet); + dev = device_from_tablet(wlr_tablet_from_input_device(wlr_dev)); break; case WLR_INPUT_DEVICE_TABLET_PAD: - dev = device_from_tablet_pad(wlr_dev->tablet_pad); + dev = device_from_tablet_pad(wlr_tablet_pad_from_input_device(wlr_dev)); break; } return dev->handle; diff --git a/backend/libinput/events.c b/backend/libinput/events.c index e52dbd95..b9f2f43c 100644 --- a/backend/libinput/events.c +++ b/backend/libinput/events.c @@ -41,17 +41,23 @@ void destroy_libinput_input_device(struct wlr_libinput_input_device *dev) { bool wlr_input_device_is_libinput(struct wlr_input_device *wlr_dev) { switch (wlr_dev->type) { case WLR_INPUT_DEVICE_KEYBOARD: - return wlr_dev->keyboard->impl == &libinput_keyboard_impl; + return wlr_keyboard_from_input_device(wlr_dev)->impl == + &libinput_keyboard_impl; case WLR_INPUT_DEVICE_POINTER: - return wlr_dev->pointer->impl == &libinput_pointer_impl; + return wlr_pointer_from_input_device(wlr_dev)->impl == + &libinput_pointer_impl; case WLR_INPUT_DEVICE_TOUCH: - return wlr_dev->touch->impl == &libinput_touch_impl; + return wlr_touch_from_input_device(wlr_dev)->impl == + &libinput_touch_impl; case WLR_INPUT_DEVICE_TABLET_TOOL: - return wlr_dev->tablet->impl == &libinput_tablet_impl; + return wlr_tablet_from_input_device(wlr_dev)-> impl == + &libinput_tablet_impl; case WLR_INPUT_DEVICE_TABLET_PAD: - return wlr_dev->tablet_pad->impl == &libinput_tablet_pad_impl; + return wlr_tablet_pad_from_input_device(wlr_dev)->impl == + &libinput_tablet_pad_impl; case WLR_INPUT_DEVICE_SWITCH: - return wlr_dev->switch_device->impl == &libinput_switch_impl; + return wlr_switch_from_input_device(wlr_dev)->impl == + &libinput_switch_impl; default: return false; } |