Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.12.1, 5.12.2, 5.12.3, 5.12.4
-
wacom bamboo; wacom Cintiq 22HD
-
-
786c58817187bb18552934c807ba7a7ea845f49e (qt/qtbase/5.12)
Description
After upgrading from 5.11.1 to 5.12.X QML windows no longer reacted to Wacom tablet input (move, press, release) when in 'Pen mode'. The QML content is placed inside QQuickViews.
After digging up a bit, I discovered two things:
1. QQuickWindow's handleMouseEvent() disgards any events, marked as Qt::MouseEventSynthesizedBySystem.
if (event->source() == Qt::MouseEventSynthesizedBySystem) { event->accept(); return; }
2. As of 5.12.X, the 'qtbase/src/plugins/platforms/windows/qwindowscontext.cpp' seems to have been extended to specifically handle tablet (pointer) input:
case QtWindows::MouseWheelEvent: case QtWindows::MouseEvent: case QtWindows::LeaveEvent: { QWindow *window = platformWindow->window(); while (window && (window->flags() & Qt::WindowTransparentForInput)) window = window->parent(); if (!window) return false; if (d->m_systemInfo & QWindowsContext::SI_SupportsPointer) return sessionManagerInteractionBlocked() || d->m_pointerHandler.translateMouseEvent(window, hwnd, et, msg, result); else return sessionManagerInteractionBlocked() || d->m_mouseHandler.translateMouseEvent(window, hwnd, et, msg, result); } break;
That effectively marks all mouse events, synthesized from tablet input, as Qt::MouseEventSynthesizedBySystem. And though it does make sense, it renders all QtQuick.Controls, MouseAreas, etc unoperable.
In fact, at some point Qt Widgets stopped working for me too. It must have been in 5.12.1 or 5.12.2. No such issue in 5.12.4.
If it's meant to work that way and there's a misunderstanding from my side, please tell me what am I missing. I did search the web before posting this out. Although the fact that my project worked in 5.11.1 makes me think it's a bug.
To reproduce the bug, simply load any QML file with MouseArea in. It will react to mouse input, but not to the tablet.
Attachments
Issue Links
- is duplicated by
-
QTBUG-76919 [REG: 5.11->5.12.0]: When using a stylus to interact with a Qt Quick based application it is not sending any click events
- Closed
- relates to
-
QTBUG-75750 Wacom tablet pen fails to work with Qt Virtual Keyboard and with MultiPointTouchArea
- Closed
-
QTBUG-100788 TapHandler tapped signal is emitted twice when using a stylus
- Closed
For Gerrit Dashboard: QTBUG-76617 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
329334,4 | windows: don't do tablet->mouse synth; inform QGuiApplication | dev | qt/qtbase | Status: NEW | -1 | 0 |