From 58df309425710ea57f727383856f439743d788fc Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Mon, 11 Jul 2022 09:45:11 +0200 Subject: [PATCH] Fix Wacom proximity on xcb again Amends 8e506fdd299d2fa18172209bea316f484e234e19 Also remove the lcQpaXInputEvents().isDebugEnabled() check to ensure that the qCDebug output is emitted. It was meant as an optimization, but skipping of printf-style qCDebugs when the logging category is disabled is efficient enough. Fixes: QTBUG-104875 Change-Id: Id8dc710a8fdb596ddce70380a577205fc52df4cc Reviewed-by: Volker Hilsheimer (cherry picked from commit 8824a4e19ca7a7c41e5a65a3305cb5a30900b8dc) --- src/plugins/platforms/xcb/qxcbconnection_xi2.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp index 74280a2508a..f528e8b593f 100644 --- a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp +++ b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp @@ -651,7 +651,7 @@ void QXcbConnection::xi2HandleEvent(xcb_ge_event_t *event) { auto *xiEvent = reinterpret_cast(event); setTime(xiEvent->time); - if (m_xiSlavePointerIds.contains(xiEvent->deviceid)) { + if (m_xiSlavePointerIds.contains(xiEvent->deviceid) && xiEvent->event_type != XCB_INPUT_PROPERTY) { if (!m_duringSystemMoveResize) return; if (xiEvent->event == XCB_NONE) @@ -1512,11 +1512,10 @@ bool QXcbConnection::xi2HandleTabletEvent(const void *event, TabletData *tabletD } // TODO maybe have a hash of tabletData->deviceId to device data so we can // look up the tablet name here, and distinguish multiple tablets - if (Q_UNLIKELY(lcQpaXInputEvents().isDebugEnabled())) - qCDebug(lcQpaXInputDevices, "XI2 proximity change on tablet %d %s (USB %x): last tool: %x id %x current tool: %x id %x %s", - tabletData->deviceId, qPrintable(tabletData->name), ptr[_WACSER_USB_ID], - ptr[_WACSER_LAST_TOOL_SERIAL], ptr[_WACSER_LAST_TOOL_ID], - ptr[_WACSER_TOOL_SERIAL], ptr[_WACSER_TOOL_ID], toolName(tabletData->tool)); + qCDebug(lcQpaXInputDevices, "XI2 proximity change on tablet %d %s (USB %x): last tool: %x id %x current tool: %x id %x %s", + tabletData->deviceId, qPrintable(tabletData->name), ptr[_WACSER_USB_ID], + ptr[_WACSER_LAST_TOOL_SERIAL], ptr[_WACSER_LAST_TOOL_ID], + ptr[_WACSER_TOOL_SERIAL], ptr[_WACSER_TOOL_ID], toolName(tabletData->tool)); } } }