summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowstabletsupport.h
Commit message (Collapse)AuthorAgeFilesLines
* Use SPDX license identifiersLucie Gérard2022-05-161-38/+2
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Windows QPA/wintab: Register tablet devicesFriedemann Kleint2020-10-201-5/+42
| | | | | | | | | | | | | | | | Inherit a class from QPointingDevice with a shared pointer to the data for a physical cursor. As a drive-by, keep the event time in QWindowsTabletSupport for leave proximity events that do not have a time associated. The previous code was relying on QWindowSystemInterface for this, which may be at odds with the tablet's time. Refactor and streamline the code a bit. Task-number: QTBUG-46412 Change-Id: I2f4fab25a49a9d9f1befbd7fc040e8eb23be71ff Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Start the native interface QWindowsApplicationFriedemann Kleint2020-07-211-3/+3
| | | | | | | | | | | | Implement the static parts of QWindowsWindowFunctions. Move some things around and make them static in tablet support to make this easier. Task-number: QTBUG-83252 Change-Id: I24c3b0b3c6548eb96c4f3285a4e46385a1e79ef5 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Use QList instead of QVector in pluginsJarek Kobus2020-07-061-3/+3
| | | | | | Task-number: QTBUG-84469 Change-Id: Ic86f4a3000592a1c9ae62e4a83f4fe39832a6b24 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Introduce QInputDevice hierarchy; replace QTouchDeviceShawn Rutledge2020-06-161-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have seen during the Qt 5 series that QMouseEvent::source() does not provide enough information: if it is synthesized, it could have come from any device for which mouse events are synthesized, not only from a touchscreen. By providing in every QInputEvent as complete information about the actual source device as possible, we will enable very fine-tuned behavior in the object that handles each event. Further, we would like to support multiple keyboards, pointing devices, and named groups of devices that are known as "seats" in Wayland. In Qt 5, QPA plugins registered each touchscreen as it was discovered. Now we extend this pattern to all input devices. This new requirement can be implemented gradually; for now, if a QTWSI input event is received wtihout a device pointer, a default "core" device will be created on-the-fly, and a warning emitted. In Qt 5, QTouchEvent::TouchPoint::id() was forced to be unique even when multiple devices were in use simultaneously. Now that each event identifies the device it came from, this hack is no longer needed. A stub of the new QPointerEvent is added; it will be developed further in subsequent patches. [ChangeLog][QtGui][QInputEvent] Every QInputEvent now carries a pointer to an instance of QInputDevice, or the subclass QPointingDevice in case of mouse, touch and tablet events. Each platform plugin is expected to create the device instances, register them, and provide valid pointers with all input events. If this is not done, warnings are emitted and default devices are created as necessary. When the device has accurate information, it provides the opportunity to fine-tune behavior depending on device type and capabilities: for example if a QMouseEvent is synthesized from a touchscreen, the recipient can see which touchscreen it came from. Each device also has a seatName to distinguish users on multi-user windowing systems. Touchpoint IDs are no longer unique on their own, but the combination of ID and device is. Fixes: QTBUG-46412 Fixes: QTBUG-72167 Task-number: QTBUG-69433 Task-number: QTBUG-52430 Change-Id: I933fb2b86182efa722037b7a33e404c5daf5292a Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Windows QPA: Replace Q_DISABLE_COPY by Q_DISABLE_COPY_MOVEFriedemann Kleint2019-05-241-1/+1
| | | | | | | | | | | Fix clang warnings like: warning: class 'QWindowsStaticOpenGLContext' defines a default destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions Change-Id: I736d20476ef407100b6ecb654d1112106e545758 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Fetch stylus button remapping from WinTab driverDmitry Kazakov2019-05-081-0/+2
| | | | | | | | | | | | The user can remap the stylus buttons using tablet driver settings. This information is available to the application via CSR_SYSBTNMAP WinTab feature. We should fetch this information every time the stylus gets into proximity, because the user can change these settings on the fly. Change-Id: Idc839905c3485179d782814f78fa862fd4a99127 Reviewed-by: Andre de la Rocha <andre.rocha@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Merge branch '5.11' into devEdward Welbourne2018-07-311-1/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/library/qmakebuiltins.cpp src/plugins/platforms/windows/qwindowstabletsupport.h src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbconnection.h src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/widgets/styles/qstylesheetstyle.cpp tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp Done-With: Gatis Paeglis <gatis.paeglis@qt.io> Change-Id: I000b0eb3cea2a5c7a99b95732bfdd41507cf916e
| * Windows QPA: Fix tablet event coords delay for tablets in pen modeRomain Pokrzywka2018-07-241-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that the mouse mode check is only done once for the first event after the TabletEnterProximityEvent, the m_oldGlobalPosF member has lost its purpose and should be removed. Worse, its value was used instead of currentGlobalPosF when in pen mode, resulting in an unnecessary 1-frame delay in the reported positions in the tablet events. Task-number: QTBUG-36937 Change-Id: I6bd2db57898850a65088d9bb41fbfbd96eac54f5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Windows QPA: Fix Qt include statementsFriedemann Kleint2018-05-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Change #include <QtCore/QDebug> to #include <QtCore/qdebug.h> according to the coding style. Change-Id: I6ba8a7424c548ddde1d18f3f6f4f87e30973d710 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Windows QPA: Refactor the tablet codeFriedemann Kleint2018-03-281-15/+16
|/ | | | | | | | | | - Port to C++ 11: - Use member initialization for QWindowsTabletDeviceData - Use nullptr - Fix the debug operator for QWindowsTabletDeviceData Change-Id: I6ed1141d7064a4ea2717d36ec0bb2dceea857d46 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Windows QPA: Improve tablet mode detectionFriedemann Kleint2018-03-171-0/+15
| | | | | | | | | | | | | | | Change the code to detect mouse mode only the first packet after receiving the enter proximity event, using the current tablet position. This should prevent mis-detecting mouse mode due to lags, etc. There is a theoretical chance of failing to detect mouse mode should the positions match resulting in differing speeds of mouse/tablet positions, but this seems to be a negligible risk. Task-number: QTBUG-36937 Task-number: QTBUG-64781 Change-Id: I27ca4a17786164dc8b25c4614a88672e150d5fe3 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Convert features.tabletevent to QT_CONFIGStephan Binner2017-06-281-3/+3
| | | | | Change-Id: Ibd7ed7f269a64afddadee70979b20f1c58398378 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Windows QPA plugin: Use member initializationFriedemann Kleint2016-11-301-12/+9
| | | | | | | | Use C++ 11 member initialization in value-type structs. Task-number: QTBUG-51673 Change-Id: I668389b4a0ad1d862a505b740d67357cb9c2a3dc Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* Windows QPA: Remove Windows CE.Friedemann Kleint2016-03-291-2/+2
| | | | | | Task-number: QTBUG-51673 Change-Id: I5b58a7d1651fce7f868a4d3fdd8fa46f35e67695 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-02-241-1/+1
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java src/plugins/platforms/windows/qwindowsfontengine.cpp src/plugins/platforms/windows/qwindowsnativeimage.cpp tests/auto/gui/kernel/qwindow/BLACKLIST tests/auto/gui/kernel/qwindow/tst_qwindow.cpp Change-Id: I649b32b260ce0ed2d6a5089021daa0d6a8db85f7
| * Windows QPA: Fix warnings as shown by Qt Creator's Clang based code model.Friedemann Kleint2016-02-191-1/+1
| | | | | | | | | | | | | | | | Code except font, accessibility and file qwindowswindow.cpp. Task-number: QTBUG-50804 Change-Id: I40848264f9fa16eea00cf70d7be009c484c49e92 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-01-151-14/+20
|/ | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Windows QPA: Fix debug operators.Friedemann Kleint2015-10-271-0/+2
| | | | | | | | | | Enclose all debug operators within QT_NO_DEBUG_STREAM, declare all public ones and make the others static. Add operators for POINT and WINDOWPLACEMENT. Task-number: QTBUG-48449 Change-Id: I33f2dba2bf486a8f5cb11f11f4e2b37cce086def Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Windows: Add platform plugin parameter for tablet absolute range.Friedemann Kleint2014-02-271-0/+4
| | | | | | | | | | | | Make the range for detecting relative (mouse mode) configureable using -platform windows:tabletabsoluterange=50 Task-number: QTBUG-36937 Change-Id: I44f928e53cb41b246c44554ec7f71bfbdf03c147 Reviewed-by: Arthur Krebsbach <Arthur.Krebsbach@Wacom.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* Windows: Fix tablet position in relative (mouse) mode.Arthur Krebsbach2013-10-141-0/+1
| | | | | | | | | | | When in "mouse" or "relative" mode with the pen position information would not be calculated correctly resulting in a significant offset between the tablet pen location and the mouse cursor location. Logic was added to detect when the two were not in sync and use the mouse location when this happens. Change-Id: Icb7129e8cce186c0099953769e215649d9347c8e Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Add WACOM tablet support for Windows.Friedemann Kleint2013-07-041-0/+142
Task-number: QTBUG-30008 Change-Id: I3327baecae7c5d1411bcd125411097f36460cde5 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>