From 4f4dd9522378f4d62a47ee9b1472378c9960b2f2 Mon Sep 17 00:00:00 2001 From: Simon Zeni Date: Wed, 23 Feb 2022 14:06:02 -0500 Subject: backend/libinput: rework touch interface The wlr_libinput_input_device now owns its wlr_touch, instead of creating a new wlr_libinput_input_device for it. --- include/backend/libinput.h | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'include/backend') diff --git a/include/backend/libinput.h b/include/backend/libinput.h index 69b30f26..c8719af3 100644 --- a/include/backend/libinput.h +++ b/include/backend/libinput.h @@ -37,6 +37,7 @@ struct wlr_libinput_input_device { struct wlr_keyboard keyboard; struct wlr_pointer pointer; struct wlr_switch switch_device; + struct wlr_touch touch; struct wl_list link; }; @@ -96,18 +97,19 @@ struct wlr_libinput_input_device *device_from_switch( void handle_switch_toggle(struct libinput_event *event, struct wlr_switch *switch_device); -struct wlr_touch *create_libinput_touch( - struct libinput_device *device); +void init_device_touch(struct wlr_libinput_input_device *dev); +struct wlr_libinput_input_device *device_from_touch( + struct wlr_touch *touch); void handle_touch_down(struct libinput_event *event, - struct libinput_device *device); + struct wlr_touch *touch); void handle_touch_up(struct libinput_event *event, - struct libinput_device *device); + struct wlr_touch *touch); void handle_touch_motion(struct libinput_event *event, - struct libinput_device *device); + struct wlr_touch *touch); void handle_touch_cancel(struct libinput_event *event, - struct libinput_device *device); + struct wlr_touch *touch); void handle_touch_frame(struct libinput_event *event, - struct libinput_device *device); + struct wlr_touch *touch); struct wlr_tablet *create_libinput_tablet( struct libinput_device *device); -- cgit v1.2.3