Commit 74cd082e authored by Peter Hutterer's avatar Peter Hutterer

Fix up for new libinput API - without touch subtypes

Touch types are now top-level event types.
Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
parent ac6e2171
...@@ -402,7 +402,9 @@ xf86libinput_handle_axis(InputInfoPtr pInfo, struct libinput_event_pointer *even ...@@ -402,7 +402,9 @@ xf86libinput_handle_axis(InputInfoPtr pInfo, struct libinput_event_pointer *even
} }
static void static void
xf86libinput_handle_touch(InputInfoPtr pInfo, struct libinput_event_touch *event) xf86libinput_handle_touch(InputInfoPtr pInfo,
struct libinput_event_touch *event,
enum libinput_event_type event_type)
{ {
DeviceIntPtr dev = pInfo->dev; DeviceIntPtr dev = pInfo->dev;
int type; int type;
...@@ -417,15 +419,15 @@ xf86libinput_handle_touch(InputInfoPtr pInfo, struct libinput_event_touch *event ...@@ -417,15 +419,15 @@ xf86libinput_handle_touch(InputInfoPtr pInfo, struct libinput_event_touch *event
slot = libinput_event_touch_get_slot(event); slot = libinput_event_touch_get_slot(event);
switch (libinput_event_touch_get_touch_type(event)) { switch (event_type) {
case LIBINPUT_TOUCH_TYPE_DOWN: case LIBINPUT_EVENT_TOUCH_DOWN:
type = XI_TouchBegin; type = XI_TouchBegin;
touchids[slot] = next_touchid++; touchids[slot] = next_touchid++;
break; break;
case LIBINPUT_TOUCH_TYPE_UP: case LIBINPUT_EVENT_TOUCH_UP:
type = XI_TouchEnd; type = XI_TouchEnd;
break; break;
case LIBINPUT_TOUCH_TYPE_MOTION: case LIBINPUT_EVENT_TOUCH_MOTION:
type = XI_TouchUpdate; type = XI_TouchUpdate;
break; break;
default: default:
...@@ -482,9 +484,13 @@ xf86libinput_handle_event(struct libinput_event *event) ...@@ -482,9 +484,13 @@ xf86libinput_handle_event(struct libinput_event *event)
break; break;
case LIBINPUT_EVENT_TOUCH_FRAME: case LIBINPUT_EVENT_TOUCH_FRAME:
break; break;
case LIBINPUT_EVENT_TOUCH_TOUCH: case LIBINPUT_EVENT_TOUCH_UP:
case LIBINPUT_EVENT_TOUCH_DOWN:
case LIBINPUT_EVENT_TOUCH_MOTION:
case LIBINPUT_EVENT_TOUCH_CANCEL:
xf86libinput_handle_touch(pInfo, xf86libinput_handle_touch(pInfo,
libinput_event_get_touch_event(event)); libinput_event_get_touch_event(event),
libinput_event_get_type(event));
break; break;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment