Refactor out wlr_pointer_state

This commit is contained in:
Dominique Martinet 2017-08-14 15:55:48 +02:00
parent 0a3246ad97
commit 53e7bebd23
6 changed files with 40 additions and 39 deletions

View file

@ -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,