From ba20d5b3cae29a90b1d66c9d53f295a7c41c932e Mon Sep 17 00:00:00 2001 From: Dominique Martinet Date: Mon, 14 Aug 2017 16:07:00 +0200 Subject: Refactor out wlr_touch_state --- backend/libinput/touch.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'backend/libinput/touch.c') diff --git a/backend/libinput/touch.c b/backend/libinput/touch.c index 5d990d3c..9e08d028 100644 --- a/backend/libinput/touch.c +++ b/backend/libinput/touch.c @@ -10,7 +10,13 @@ struct wlr_touch *wlr_libinput_touch_create( struct libinput_device *libinput_dev) { assert(libinput_dev); - return wlr_touch_create(NULL, NULL); + struct wlr_touch *wlr_touch = calloc(1, sizeof(struct wlr_touch)); + if (!wlr_touch) { + wlr_log(L_ERROR, "Unable to allocate wlr_touch"); + return NULL; + } + wlr_touch_init(wlr_touch, NULL); + return wlr_touch; } void handle_touch_down(struct libinput_event *event, -- cgit v1.2.3