From 53e7bebd2381318b9edcbc8d305d4ec2bed9b3ce Mon Sep 17 00:00:00 2001
From: Dominique Martinet <asmadeus@codewreck.org>
Date: Mon, 14 Aug 2017 15:55:48 +0200
Subject: Refactor out wlr_pointer_state

---
 backend/libinput/pointer.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

(limited to 'backend/libinput')

diff --git a/backend/libinput/pointer.c b/backend/libinput/pointer.c
index c2c47592..8bda205d 100644
--- a/backend/libinput/pointer.c
+++ b/backend/libinput/pointer.c
@@ -10,7 +10,13 @@
 struct wlr_pointer *wlr_libinput_pointer_create(
 		struct libinput_device *libinput_dev) {
 	assert(libinput_dev);
-	return wlr_pointer_create(NULL, NULL);
+	struct wlr_pointer *wlr_pointer = calloc(1, sizeof(struct wlr_pointer));
+	if (!wlr_pointer) {
+		wlr_log(L_ERROR, "Unable to allocate wlr_pointer");
+		return NULL;
+	}
+	wlr_pointer_init(wlr_pointer, NULL);
+	return wlr_pointer;
 }
 
 void handle_pointer_motion(struct libinput_event *event,
-- 
cgit v1.2.3