wlr_input_device: remove anon union field

This union is unnecessary since the recent input device refactor and can
now be replaced by wlr_*_from_input_device() functions.
This commit is contained in:
Isaac Freund 2022-06-20 16:57:29 +02:00 committed by Simon Ser
parent 5c4384a133
commit 91943a68a6
31 changed files with 216 additions and 130 deletions

View file

@ -317,11 +317,11 @@ void update_x11_pointer_position(struct wlr_x11_output *output,
bool wlr_input_device_is_x11(struct wlr_input_device *wlr_dev) {
switch (wlr_dev->type) {
case WLR_INPUT_DEVICE_KEYBOARD:
return wlr_dev->keyboard->impl == &x11_keyboard_impl;
return wlr_keyboard_from_input_device(wlr_dev)->impl == &x11_keyboard_impl;
case WLR_INPUT_DEVICE_POINTER:
return wlr_dev->pointer->impl == &x11_pointer_impl;
return wlr_pointer_from_input_device(wlr_dev)->impl == &x11_pointer_impl;
case WLR_INPUT_DEVICE_TOUCH:
return wlr_dev->touch->impl == &x11_touch_impl;
return wlr_touch_from_input_device(wlr_dev)->impl == &x11_touch_impl;
default:
return false;
}