From a4fb852a9406f86d156e67852245c2049be142cf Mon Sep 17 00:00:00 2001
From: Xaver Hugl <xaver.hugl@gmail.com>
Date: Tue, 12 Jan 2021 14:08:31 +0100
Subject: [PATCH] Replace per-device touch slot with global slot

With multiple touch devices the slots could interfere
---
 autotests/libinput/mock_libinput.cpp | 2 +-
 libinput/events.cpp                  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/autotests/libinput/mock_libinput.cpp b/autotests/libinput/mock_libinput.cpp
index f4a5ff85b7..39968ecdb7 100644
--- a/autotests/libinput/mock_libinput.cpp
+++ b/autotests/libinput/mock_libinput.cpp
@@ -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;
 }
diff --git a/libinput/events.cpp b/libinput/events.cpp
index 899fc2c4e7..bbd83b2ff6 100644
--- a/libinput/events.cpp
+++ b/libinput/events.cpp
@@ -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;
 }