From d750c5ac676850d93ba7abf0a08476c4535ff1b6 Mon Sep 17 00:00:00 2001 From: Simon Zeni Date: Wed, 23 Feb 2022 13:41:34 -0500 Subject: 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. --- include/backend/libinput.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'include/backend') 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); -- cgit v1.2.3