summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowspointerhandler.h
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-07-171-0/+1
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qlogging.cpp src/gui/painting/qtextureglyphcache_p.h src/gui/text/qfontengine.cpp src/widgets/widgets/qlineedit.cpp Change-Id: Ic8798538df466b7141caa8bbf1fb7605eb56be37
| * Windows QPA: Fix handling of mouse messages synthesized by the OSAndré de la Rocha2019-07-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | The old handler only marked mouse events associated with mouse messages synthesized by the OS with Qt::MouseEventSynthesizedBySystem when these messages resulted from touch screen, not tablet input. Quick seems to depend on this behavior. Fixes: QTBUG-76617 Change-Id: Ib863d73ae9325f9a19d8a175817fef4e82f7df0b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@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>
* Windows QPA: Fix QWheelEvent::buttons() after click on title barAndre de la Rocha2019-05-181-1/+4
| | | | | | | | | | | | | | | When the left or right mouse buttons are pressed over the window title bar a WM_NCLBUTTONDOWN/WM_NCRBUTTONDOWN message is received. But when the button is released, no corresponding UP message is received, but only a WM_NCMOUSEMOVE or WM_MOUSEMOVE. This makes the internal mouse button state stored in QGuiApplication get out of sync with the actual state, resulting in an incorrect button state being used in QWheelEvent. This patch detects the button release condition and generates the missing release event. Change-Id: I6dd9f8580bd6ba772522574f9a08298e49c43e61 Fixes: QTBUG-75678 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Windows QPA: Handle mouse input using legacy messagesAndre de la Rocha2019-02-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change reverts to using legacy mouse messages when handling mouse and touchpad input, while using pointer messages to handle touchscreen and pen input. The use of pointer messages to handle everything, added in 5.12.0, caused issues in some particular cases, due mainly to differences in behavior or bugs in the pointer messages, which required workarounds in the Windows QPA, which didn't work well in all cases and led to additional issues. For instance, DoDragDrop() does not work when called by pointer (or touch/pen) handlers, but only after OS-synthesized legacy mouse messages are generated. Also, in some cases pointer messages for mouse movement are generated as non-client for client area events. Modal loops like the ones in window resize/move and menu handling caused some issues with pointer messages, as well. Also, we have to handle the OS-synthesized legacy mouse message generated for touch and pen. Ignoring them while letting the gui layer synthesize mouse events for touch/pen may break Drag and Drop by triggering DoDragDrop() before legacy messages, which can result in a hang inside the DoDragDrop() modal loop. This change should fix most regressions related to pointer messages, while keeping the enhancements in pen and touch input. Fixes: QTBUG-73389 Fixes: QTBUG-72624 Fixes: QTBUG-72801 Fixes: QTBUG-73290 Fixes: QTBUG-72458 Fixes: QTBUG-73358 Fixes: QTBUG-72992 Change-Id: I919f78930d3965270ef2094401e827ab87174979 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Windows QPA: Support "press and hold for right-clicking"Andre de la Rocha2019-01-141-0/+1
| | | | | | | | | | | | | Windows sends a fake WM_RBUTTONUP/WM_RBUTTONDOWN when the user presses and holds the pen/finger on a tablet/touchscreen, e.g., in order to show a context menu. Windows only sends already synthesized legacy mouse messages for this condition, instead of anything detectable in the pointer messages. So we need to handle these legacy messages in the Windows QPA. Task-number: QTBUG-36162 Change-Id: Ia93c423601e2e8a8baac3f9b7791bf8a3113885a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Windows QPA: Fix mouse pointer capture and Enter/Leave eventsAndre de la Rocha2019-01-031-0/+4
| | | | | | | | | | Qt expects the platform plugin to capture the mouse on any button press and keep it captured until buttons are released. The missing capture logic was causing extra Enter/Leave events to be generated. Change-Id: I5a78ea600374701c740f395b38ba5abd51f561d8 Fixes: QTBUG-72600 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Windows QPA: Fix incorrect button state reporting for touchpadAndre de la Rocha2018-11-081-1/+0
| | | | | | | | | | | | | | The current state of (emulated) mouse buttons was being incorrectly reported for touchpad events under some conditions. In the handling of pointer messages, GetAsyncKeyState() was being used to retrieve the mouse button state. However, it does not seem to work always with all touchpads. Furthermore, its use is not necessary, since the button state information comes as a set of flags with the pointer message itself. This change makes the handler use these flags instead. Fixes: QTBUG-71470 Change-Id: Ie2e35bd80778ef74db672604a0f2af659785efbf Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Windows QPA: Do not double delete the QTouchDeviceJan Arve Sæther2018-08-141-2/+2
| | | | | | | | | | | | | | | This caused a crash on destruction because as soon as you construct a QTouchDevice it will register itself to a list of devices. On application exit the function cleanupDevicesList() in qtouchdevice.cpp would go through all registered QTouchDevices and destroy them. Therefore, there is no need to delete the QTouchDevice from QWindowsPointerHandler. This was a regression that was caused by 20d6dac63c25d227ed5315801e3e853ee78ec248 Change-Id: I58fb50016c047c3843a3f9677f2c2ef824223d43 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
* Add Windows Pointer Input Messages supportAndre de la Rocha2018-07-121-0/+82
Replaces the handling of tablet/touchscreen/touchpad/mouse input with a unified implementation based on the Windows Pointer Input Messages added to Windows 8. The legacy implementation is still used for Windows 7. Task-number: QTBUG-60437 Change-Id: I0a0f48ee9d5365f84ba528aa04c6ab1fe4253c50 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>