From 73dafaf265a6c6a51611a093c2cc81a6d61767a9 Mon Sep 17 00:00:00 2001 From: Alexander Volkov Date: Thu, 22 Dec 2016 15:12:28 +0300 Subject: xcb: Ignore XI2 LMB mouse events from touch screens 157ee01a8d0be9a4dbac03883c9eaf3609fc1172 was trying to minimize some side effects of the bug in the evdev driver (https://bugs.freedesktop.org/show_bug.cgi?id=98188) by not changing mouse button state on motion. Unfortunately it resurrected bugs that were fixed by 76de1ac0a4cd384f608a14b5d77a8cf3ef1ec868. Filter out mouse events from touch screens instead. This change reverts 157ee01a8d0be9a4dbac03883c9eaf3609fc1172. Task-number: QTBUG-32609 Task-number: QTBUG-35065 Task-number: QTBUG-43776 Task-number: QTBUG-44166 Task-number: QTBUG-44231 Task-number: QTBUG-56156 Change-Id: Ie17710d94beabeb08681d669a9d8309be9b44e73 Reviewed-by: Shawn Rutledge --- src/plugins/platforms/xcb/qxcbconnection_xi2.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/plugins/platforms/xcb/qxcbconnection_xi2.cpp') diff --git a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp index 0ace79a4f5..f4f56f25f1 100644 --- a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp +++ b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp @@ -1025,6 +1025,13 @@ Qt::MouseButton QXcbConnection::xiToQtMouseButton(uint32_t b) return Qt::NoButton; } +bool QXcbConnection::isTouchScreen(int id) const +{ + auto device = m_touchDevices.value(id); + return device && device->qtTouchDevice + && device->qtTouchDevice->type() == QTouchDevice::TouchScreen; +} + static QTabletEvent::TabletDevice toolIdToTabletDevice(quint32 toolId) { // keep in sync with wacom_intuos_inout() in Linux kernel driver wacom_wac.c switch (toolId) { -- cgit v1.2.3