Replace per-device touch slot with global slot

With multiple touch devices the slots could interfere
This commit is contained in:
Xaver Hugl 2021-01-12 14:08:31 +01:00 committed by Aleix Pol Gonzalez
parent 8bb5b27448
commit a4fb852a94
2 changed files with 2 additions and 2 deletions

View file

@ -635,7 +635,7 @@ double libinput_event_touch_get_y_transformed(struct libinput_event_touch *event
return event->absolutePos.y() / deviceHeight * height;
}
int32_t libinput_event_touch_get_slot(struct libinput_event_touch *event)
int32_t libinput_event_touch_get_seat_slot(struct libinput_event_touch *event)
{
return event->slot;
}

View file

@ -263,7 +263,7 @@ qint32 TouchEvent::id() const
{
Q_ASSERT(type() != LIBINPUT_EVENT_TOUCH_CANCEL && type() != LIBINPUT_EVENT_TOUCH_FRAME);
const qint32 slot = libinput_event_touch_get_slot(m_touchEvent);
const qint32 slot = libinput_event_touch_get_seat_slot(m_touchEvent);
return slot == -1 ? 0 : slot;
}