diff options
author | Simon Zeni <simon@bl4ckb0ne.ca> | 2022-02-23 13:41:34 -0500 |
---|---|---|
committer | Kirill Primak <vyivel@eclair.cafe> | 2022-03-02 18:18:05 +0000 |
commit | d750c5ac676850d93ba7abf0a08476c4535ff1b6 (patch) | |
tree | 181187a77e53497b33ab8eddb752bb44c144eb41 /include/backend/libinput.h | |
parent | d60cdad3ea1fed18bbda542b42d3fd7283c88909 (diff) |
backend/libinput: rework switch interface
The wlr_libinput_input_device now owns its wlr_switch, instead of creating
a new wlr_libinput_input_device for it.
Diffstat (limited to 'include/backend/libinput.h')
-rw-r--r-- | include/backend/libinput.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/backend/libinput.h b/include/backend/libinput.h index bcb36a71..69b30f26 100644 --- a/include/backend/libinput.h +++ b/include/backend/libinput.h @@ -36,6 +36,7 @@ struct wlr_libinput_input_device { struct wlr_keyboard keyboard; struct wlr_pointer pointer; + struct wlr_switch switch_device; struct wl_list link; }; @@ -89,10 +90,11 @@ void handle_pointer_hold_begin(struct libinput_event *event, void handle_pointer_hold_end(struct libinput_event *event, struct wlr_pointer *pointer); -struct wlr_switch *create_libinput_switch( - struct libinput_device *device); +void init_device_switch(struct wlr_libinput_input_device *dev); +struct wlr_libinput_input_device *device_from_switch( + struct wlr_switch *switch_device); void handle_switch_toggle(struct libinput_event *event, - struct libinput_device *device); + struct wlr_switch *switch_device); struct wlr_touch *create_libinput_touch( struct libinput_device *device); |