diff options
author | Simon Zeni <simon@bl4ckb0ne.ca> | 2022-02-23 10:42:20 -0500 |
---|---|---|
committer | Kirill Primak <vyivel@eclair.cafe> | 2022-03-02 18:18:05 +0000 |
commit | 5eefda1ffe16bdacd3445259937cfed119409e22 (patch) | |
tree | 9ad304cde4f723f1dc914c5447df01b1dd05e830 /include | |
parent | 9dd6e2b90521fd438c90837c646a1fb4092bfe1b (diff) |
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.
Diffstat (limited to 'include')
-rw-r--r-- | include/backend/libinput.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/include/backend/libinput.h b/include/backend/libinput.h index e443c0ec..1e1ac8c5 100644 --- a/include/backend/libinput.h +++ b/include/backend/libinput.h @@ -32,8 +32,11 @@ struct wlr_libinput_backend { struct wlr_libinput_input_device { struct wlr_input_device wlr_input_device; - struct wl_list link; struct libinput_device *handle; + + struct wlr_keyboard keyboard; + + struct wl_list link; }; uint32_t usec_to_msec(uint64_t usec); @@ -54,10 +57,9 @@ extern const struct wlr_tablet_impl libinput_tablet_impl; extern const struct wlr_tablet_pad_impl libinput_tablet_pad_impl; extern const struct wlr_touch_impl libinput_touch_impl; -struct wlr_keyboard *create_libinput_keyboard( - struct libinput_device *device); -void handle_keyboard_key(struct libinput_event *event, - struct libinput_device *device); +void init_device_keyboard(struct wlr_libinput_input_device *dev); +struct wlr_libinput_input_device *device_from_keyboard(struct wlr_keyboard *kb); +void handle_keyboard_key(struct libinput_event *event, struct wlr_keyboard *kb); struct wlr_pointer *create_libinput_pointer( struct libinput_device *device); |