mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-12-16 08:56:26 -05:00
backend/libinput: rework keyboard interface
The wlr_libinput_input_device now owns its wlr_keyboard, instead of creating a new wlr_libinput_input_device for it.
This commit is contained in:
parent
9dd6e2b905
commit
5eefda1ffe
4 changed files with 83 additions and 70 deletions
|
|
@ -238,8 +238,16 @@ struct wlr_backend *wlr_libinput_backend_create(struct wl_display *display,
|
|||
|
||||
struct libinput_device *wlr_libinput_get_device_handle(
|
||||
struct wlr_input_device *wlr_dev) {
|
||||
struct wlr_libinput_input_device *dev =
|
||||
(struct wlr_libinput_input_device *)wlr_dev;
|
||||
struct wlr_libinput_input_device *dev = NULL;
|
||||
switch (wlr_dev->type) {
|
||||
case WLR_INPUT_DEVICE_KEYBOARD:
|
||||
dev = device_from_keyboard(wlr_dev->keyboard);
|
||||
break;
|
||||
default:
|
||||
dev = (struct wlr_libinput_input_device *)wlr_dev;
|
||||
break;
|
||||
}
|
||||
|
||||
return dev->handle;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue