summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowscontext.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.12' into devLiang Qi2019-06-251-2/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/gui/painting/qdrawhelper.cpp src/gui/text/qdistancefield.cpp src/gui/text/qdistancefield_p.h src/network/ssl/qsslsocket_openssl.cpp src/plugins/platforms/android/qandroidinputcontext.cpp src/widgets/styles/qstylesheetstyle.cpp Done-With: Timur Pocheptsov <timur.pocheptsov@qt.io> Change-Id: Ia7daad21f077ea889898f17734ec46303e71fe6b
| * Windows: Use UUIDs instead of function pointer to mangle window classesTim Blechmann2019-06-181-2/+3
| | | | | | | | | | | | | | | | | | | | | | Instead of using the address of a function pointer, we name-mangle window classes by using an UUID. This fixes a real-world problem with multiple Qt instances where for some reasons the window function appears to be mapped to the same address. Change-Id: Id27e8d7aa17a4db9c14559224395f49d3ecd8d78 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-06-141-2/+11
|\| | | | | | | | | | | | | | | | | | | Conflicts: qmake/generators/makefile.cpp qmake/generators/unix/unixmake2.cpp src/corelib/thread/qthread_unix.cpp tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp Change-Id: I1df0d4ba20685de7f9300bf07458c13376493408
| * Windows: Call ReleaseDC for the private's displayContextAndy Shaw2019-04-101-0/+2
| | | | | | | | | | Change-Id: Ib5ee1bbe9037ceb13562eadb754c2a5f095b7f87 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * Windows QPA: Fix clang warnings about narrowing conversionsFriedemann Kleint2019-05-291-2/+3
| | | | | | | | | | | | Change-Id: Iba173b45fb77918694fc2c7506885fdeef9f6064 Reviewed-by: André de la Rocha <andre.rocha@qt.io>
| * Windows QPA: Fix QGuiApplication::topLevelAt() with screen recorder applicationsFriedemann Kleint2019-05-281-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | Special applications like screen recorders can create special, invisible windows which are detected by the ChildWindowFromPointEx() as used in QWindowsContext::findPlatformWindowAt(). Fall back to WindowFromPoint() which skips those in case nothing is found. Fixes: QTBUG-40815 Change-Id: Idb5253c412fb4522c844edf5eadedc6e0fad3979 Reviewed-by: André de la Rocha <andre.rocha@qt.io>
* | Windows QPA: Fix clang warnings about repetitive type namesFriedemann Kleint2019-06-131-6/+6
| | | | | | | | | | | | | | | | | | | | Fix warning like: warning: use auto when initializing with new/reinterpret_cast to avoid duplicating the type name [modernize-use-auto] Change-Id: Ieb7f052919173f6923e68de9f9e849dee45e36e7 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into devFriedemann Kleint2019-05-271-0/+4
|\| | | | | | | Change-Id: Ia279fc4a8226626041c772902a07b2f90f37b53b
| * Windows QPA: Fix QWheelEvent::buttons() after click on title barAndre de la Rocha2019-05-181-0/+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: Fix RTL window title barsFriedemann Kleint2019-05-221-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a platform option to the plugin (-platform windows:reverse) that enables reverse mode. It sets WS_EX_LAYOUTRTL on RTL windows, forces normal orientation on all HDCs created for the window, fixes ClientToScreen()/ScreenToClient() accordingly and transforms mouse events. [ChangeLog][Platform Specific Changes][Windows] It is now possible to enable RTL mode by passing the option -platform windows:reverse. Fixes: QTBUG-28463 Change-Id: I4d70818b2fd315d4e8d5627eab11ae912c6e77be Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: André de la Rocha <andre.rocha@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-05-151-10/+21
|\| | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qfloat16.cpp src/corelib/global/qfloat16.h src/plugins/platforms/windows/qwindowswindow.cpp Change-Id: I0938aaa6a9771f55e48c95ed29f6f5291431b947
| * Windows QPA: Fix resize loops when moving fixed size windows between screensFriedemann Kleint2019-05-131-11/+18
| | | | | | | | | | | | | | | | | | | | Postpone the screen change until the DPI changed event in case a move between screens with different DPI is detected. Task-number: QTBUG-65580 Change-Id: I356f144b243d7d1ce7feabf0434c3f534b903965 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
| * Windows QPA: Fix window frame calculation in multi-monitor setupsFriedemann Kleint2019-05-131-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When introducing EnableNonClientDpiScaling() for QTBUG-53255, the window frame calculation was not adapted. That is, window frames were calculated from the style for the primary screen only, causing - minimum size constraints not being calculated correctly for applications on secondary screens when populating the MINMAXINFO structure. - warnings about not being able to apply a geometry when moving fixed size windows across screens. The calculation of the frames for propagating size hints is also no longer required after 3035400f36731c400adb9204b94e9afe346a71b7, which retrieves them from the WM_NCCALCSIZE message; QWindowsWindow::fullFrameMargins() can be used instead. For newly created windows, use the newly added AdjustWindowRectExForDpi() function to calculate the initial frame size. Change QWindowsGeometryHint from a class to a collection of static functions and add overloads to calculate the frame. In checkForScreenChanged(), update the margins until WM_NCCALCSIZE is received. Task-number: QTBUG-67777 Task-number: QTBUG-65580 Task-number: QTBUG-53255 Change-Id: Iff2d382b2b316adec6c1a0622ae8015dba6de371 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
| * Windows QPA: Improve debug messagesFriedemann Kleint2019-05-091-0/+2
| | | | | | | | | | | | | | | | | | | | Include screen and MINMAXINFO values in the message about not being able to set the geometry. Suppress output of some window finding functions unless verbose. Change-Id: Iaaae59ecb302438b3444735067d018c77d2af162 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Prefix textstream operators with Qt::Lars Knoll2019-05-021-2/+2
| | | | | | | | | | | | | | As the non prefixed variants are deprecated Change-Id: I2ba09d71b9cea5203b54297a3f2332e6d44fedcf Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Widen out parameter "result" of the native event filters for Qt 6Friedemann Kleint2019-03-221-0/+8
|/ | | | | | | | | LRESULT on Windows 64 is a 64bit type, adapt filter functions of QAbstractNativeEventFilter and QAbstractEventDispatcher accordingly. Fixes: QTBUG-72968 Change-Id: Ie53193e355f0b8e9bd59fa377f43e2b4664a2ded Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Windows QPA: Fix override cursor when modal window is presentFriedemann Kleint2019-02-271-0/+6
| | | | | | | | | | Handle WM_SETCURSOR to apply override cursors to window that do not have mouse capture (as is done in Qt 4). Fixes: QTBUG-58590 Change-Id: I7ff6f799da1b8d4b4396c0a6137778a11a192617 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
* Windows QPA: Handle mouse input using legacy messagesAndre de la Rocha2019-02-121-12/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/Direct2d QPA: Use nullptrFriedemann Kleint2019-01-281-29/+30
| | | | | Change-Id: I6ce01caa58de78e0eb61e243ee1e7b05cc1f5568 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Windows QPA: Cache "forcedScreenForGLWindow" to avoid overheadAndre de la Rocha2019-01-241-0/+2
| | | | | | | | | | | | | The fix for QTBUG-50371 caused an overhead when you hover over a secondary window like a tool tip, menu or combo box due to the forcedScreenForGLWindow() function being called, which loads dx9.dll and sub-dlls and unloads them afterwards. This fix caches the required info on the first call, and only refreshes it when required by a display/settings change. Fixes: QTBUG-73008 Change-Id: Ie604ba4034ad8041b971f5aa46bd43ae03decd55 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Windows QPA: Add helper function to obtain DPI-dependent metrics on Windows 10Friedemann Kleint2018-10-171-0/+40
| | | | | | | | | Use newly introduced SystemParametersInfoForDpi() API with some convenience overloads. Task-number: QTBUG-4362 Change-Id: I4c41c700007bf7cc4fd5868356e3145c136704c0 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* QWindowsContext: proper check resolved functionAnton Kudryavtsev2018-10-161-1/+1
| | | | | Change-Id: I9a223dc2efa2205dc3ae8d300cf06b12e06ed0f9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Windows QPA: Add WM_INPUT to the list of input messages for event filteringFriedemann Kleint2018-10-161-0/+1
| | | | | | | | Amends a0a22037cdacbf51a2db560ff902a5a341561b15. Task-number: QTBUG-67095 Change-Id: I32d2e78f9d9525d56c1d4477d69cf7b9d7f8e7a3 Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Merge remote-tracking branch 'origin/5.11' into 5.12Qt Forward Merge Bot2018-10-081-1/+0
|\ | | | | | | | | | | | | Conflicts: src/corelib/tools/qtimezoneprivate.cpp Change-Id: Icbb5999d378711ce3786a4fe0aba176a45ac702c
| * Windows QPA: Fix WM_NCHITTEST not being sent to QAbstractNativeEventFilterFriedemann Kleint2018-10-021-1/+0
| | | | | | | | | | | | | | | | | | | | | | The message is not sent to the QAbstractEventDispatcher, so it needs to be excluded from the list of input messages not sent to QAbstractNativeEventFilter. Amends a0a22037cdacbf51a2db560ff902a5a341561b15. Fixes: QTBUG-70873 Change-Id: Id84d73b46e8954867c06a4ddf5dc9e536ecd897e Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Windows QPA: Work around intermittent clipboard copy failuresFriedemann Kleint2018-09-281-0/+32
| | | | | | | | | | | | | | | | | | Repeatedly attempt to open the clipboard in case it is opened by other applications. Task-number: QTBUG-27097 Change-Id: Ic1cfec0bb17e34f8c7f744add21a4431dae4f5b7 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | Windows QPA: Dispatch skipped touch/pen events if compression is offRomain Pokrzywka2018-09-141-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the hardware produces events faster than the app can consume between two updates, Windows automatically coalesces them into a single message with the latest touch/pen pointer state and coordinates, effectively compressing those events. But the pointer API also supports querying and retrieving the skipped individual touch and pen frames. There are cases where keeping all the events generated by the hardware is desired, especially for pen events where having the most sampled points available is critical to precisely rendering curves. Qt already defines application attributes to control event compression for general high frequency events and for tablet events in particular. Use them on Windows also to control whether to retrieve skipped frames. [ChangeLog][Windows] The application attributes AA_CompressTabletEvents and AA_CompressHighFrequencyEvents are now supported on Windows 8 and above for touch/pen input, with the same defaults as on X11 (compress touch events, don't compress tablet events) Task-number: QTBUG-44964 Task-number: QTBUG-60437 Change-Id: I1b11a043e2d71ee502895971fafb3a46306a89d8 Reviewed-by: Andre de la Rocha <andre.rocha@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Windows QPA: Stop synthesizing mouse events from tablet/touchAndre de la Rocha2018-09-011-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These fake mouse events should be synthesized by QtGui, not the QPA plugin, when the tablet/touch events are not handled by the application and the Qt::AA_SynthesizeMouseForUnhandledTouchEvents or Qt::AA_SynthesizeMouseForUnhandledTabletEvents flags are set. Task-number: QTBUG-47007 Task-number: QTBUG-60437 Change-Id: I4d6d5e6667d245c45a4eb4f3a94db05cf9772f52 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Romain Pokrzywka <romain.pokrzywka@gmail.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Windows QPA: Fix duplicate Pointer Touch events and missing TouchCancelRomain Pokrzywka2018-08-301-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | translateTouchEvent needs to filter events based on the message type passed in msg, as Windows sends more than just down/up/update events, it also sends enter/leave for each touch and occasionally a few more. One of them is WM_POINTERCAPTURECHANGED which indicates a general loss of touch input, which needs to be translated to a touch cancel event. Ignore WM_POINTERENTER/WM_POINTERLEAVE events as they result in sending duplicate Qt::TouchPointPressed/Qt::TouchPointReleased events otherwise. Also avoid sending duplicate events for each additional touchpoint: Windows already bundles all available touchpoints for a touch event when calling GetPointerFrameTouchInfo, so we get all points at once, but we'll still receive other events for each additional touchpoint, resulting in reading the same bundled data again for each one and sending duplicate events to QWindowSystemInterface. Use SkipPointerFrameMessages() to avoid receiving the additional events for the frame we just processed. Finally, add raw event logging when the platform verbose level is >1. Change-Id: I55d840285f642a00f6ffcda4a3efd7ae3985310b Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
* | Windows QPA: Improve Pointer Pen events translationRomain Pokrzywka2018-08-271-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Compute QPointF hi-res screen coordinates based on the HIMETRIC values contained in the native message. This gives the same high-precision screen coordinates as what the old WinTab handler supported. Add the possibility to not synthesize mouse events if the platform plugin option DontPassOsMouseEventsSynthesizedFromTouch is set, just like we do for finger touches. This makes it possible to have clean Pen events without mouse duplicates for an application that handles both input types in parallel. Add raw event logging when the platform verbose level is >1. Change-Id: Ibf68b6275400388a76f8d5c573eed8f4b9bf4e9d Reviewed-by: Andre de la Rocha <andre.rocha@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Windows QPA: Add option to detect AltGr key pressesFriedemann Kleint2018-08-211-0/+5
| | | | | | | | | | | | | | | | | | | | | | According to MSDN, AltGr key presses are sent as a sequence of SYS left Ctrl + right Alt. Add an option to detect AltGr as modifier key. Task-number: QTBUG-69317 Change-Id: I30ce169d2e6dbbae194ff714abfbc732b53652ce Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Add logging for QPlatformBackingStore::composeAndFlushTor Arne Vestbø2018-08-071-1/+0
| | | | | | | | | | Change-Id: I96778296480d2aaad5e01ed15353106bc90d4d2b Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Add Windows Pointer Input Messages supportAndre de la Rocha2018-07-121-15/+110
| | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-07-021-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qnsview.mm src/plugins/platforms/cocoa/qnsview_dragging.mm src/plugins/platforms/ios/qiosinputcontext.mm src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/tools/androiddeployqt/main.cpp Was moved from qttools into qtbase in 5.11. So re-apply 32398e4d here. tests/auto/corelib/global/qlogging/test/test.pro tests/auto/corelib/global/qlogging/tst_qlogging.cpp tests/auto/corelib/io/qfile/tst_qfile.cpp tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp tests/auto/corelib/thread/qthreadstorage/test/test.pro tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp tests/auto/widgets/kernel/qapplication/test/test.pro Done-with: Gatis Paeglis <gatis.paeglis@qt.io> Done-with: Mårten Nordheim <marten.nordheim@qt.io> Done-with: Oliver Wolff <oliver.wolff@qt.io> Change-Id: Id970486c5315a1718c540f00deb2633533e8fc7b
| * Windows QPA: Fix crashes when processing native eventsFriedemann Kleint2018-06-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | Change a0a22037cdacbf51a2db560ff902a5a341561b15 wrongly introduced a level of indirection when passing the MSG * as void * to QWindowSystemInterface::handleNativeEvent() in QWindowsContext::filterNativeEvent(). Remove the indirection. Task-number: QTBUG-67095 Change-Id: Ibc2db7ae56bca38f79bafabfabb6127d6ff8cf09 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Fix minor stuff in Windows UI Automation supportAndre de la Rocha2018-06-271-2/+2
| | | | | | | | | | | | | | | | | | Adding missing "override" keywords in overridden interfaces, using "#if QT_CONFIG(accessibility)" instead of "#ifndef QT_NO_ACCESSIBILITY", and other minor bits. No change in behavior expected. Change-Id: Ief0e23cb7b577dd3e4af21750b6beccc80d6a2f8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Build the Windows platform plugin with QT_NO_FOREACHJoerg Bornemann2018-06-221-1/+1
| | | | | | | | | | | | | | ...for consistency with the other platform plugins. Change-Id: I85946d610a62c19140618c83f80c4aa63fce4bc3 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Windows QPA: Fix Qt include statementsFriedemann Kleint2018-05-231-12/+11
| | | | | | | | | | | | | | | | | | | | | | | | 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: Add support for invisible window marginsAndre de la Rocha2018-05-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Windows 10 windows contain an invisible area within the NC window frame on which the mouse cursor is enabled to perform resizing. This change captures the geometry of the invisible margins and considers it when moving a window, so that, for instance, a move(0,0) does not generate gap between the window and the beginning of screen. [ChangeLog][Windows] The dimensions of invisible margins inside the frames of Windows 10 windows will now be disregarded in the positioning of Qt windows to avoid a misplaced look (offset by a few pixels from the expected position). Task-number: QTBUG-55762 Change-Id: I1f537756eb1a093f78b919de9d44992528199700 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Windows QPA: Fix left button reported pressed after moving windowsFriedemann Kleint2018-05-161-0/+1
|/ | | | | | | | | | | | | When moving a window by dragging the title bar, no WM_NCLBUTTONUP is received after WM_NCLBUTTONDOWN, WM_NCMOUSEMOVE (due to internal mouse capture), which can leave the left mouse button 'pressed' in QGuiApplication's state. Intercept WM_EXITSIZEMOVE to sync the buttons. Complements 45894408913f62f6f25a302d8ed07af57ac7db5d. Change-Id: I94d18d1d4a4796dcecb1a9731809d05c7f9ddd65 Reviewed-by: Andre de la Rocha <andre.rocha@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Windows QPA: Fix duplicate/missing native eventsFriedemann Kleint2018-04-201-15/+59
| | | | | | | | | | | | | | | | | | | Add utility functions to QWindowsContext input messages sent to native event filters (event dispatcher and window system interface). Do not send input and similar events to the event dispatcher since QEventDispatcherWin32::processEvents() also sends them. Note though that QEventDispatcherWin32 does not receive all windows messages. In QWindowsKeyMapper, send the WM_CHAR/WM_IMECHAR events from where the messages are removed. Task-number: QTBUG-67095 Change-Id: I5f61294fcb3aee7e0eacd840a2010d128cd02a5d Reviewed-by: Andre de la Rocha <andre.rocha@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Windows QPA: Fix potential crash in leave event handlingFriedemann Kleint2018-03-201-1/+1
| | | | | | | | | | Add a check for window != nullptr. Amends af5c8d04fb0c9ddda58925e4862e857c78a5e563. Task-number: QTBUG-67101 Task-number: QTBUG-57864 Change-Id: I2bbbbe514fc494fd569d0932d508c53c0544f665 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Windows QPA: Improve the event loggingFriedemann Kleint2018-03-131-3/+4
| | | | | | | | | | | | Add more message codes and fix the whitespaces in the output: EVENT: hwd= 0x280484 WM_WINDOWPOSCHANGED msg=0x 47 et=0x 21e wp= 0 at -2208 -31887 handled= false -> EVENT: hwd=0x2204d6 WM_WINDOWPOSCHANGED msg=0x47 et=0x21e wp=0 at -3280,-19633 handled=false Change-Id: I89a7b3bd328748ef39fe2dcd789497f43e9d4a2a Reviewed-by: Andre de la Rocha <andre.rocha@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Merge remote-tracking branch 'origin/5.10' into 5.11Liang Qi2018-02-151-2/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/corelib.pro src/corelib/global/qrandom.cpp src/network/access/qhttpnetworkrequest_p.h src/plugins/platforms/cocoa/qcocoamenu.mm src/plugins/platforms/cocoa/qcocoansmenu.mm src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/cocoa/qnsview.mm src/plugins/platforms/offscreen/qoffscreenintegration.h src/widgets/kernel/qaction.cpp src/widgets/widgets.pro Done-with: Andy Shaw <andy.shaw@qt.io> Change-Id: Ib01547cf4184023f19858ccf0ce7fb824fed2a8d
| * Windows QPA: Suppress bogus resize events when using native menusFriedemann Kleint2018-01-241-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Account for the (not yet created) native menu height when handling the initial resize message. Complements 7849aa6e96aa923fca5523afc8cf88edcc0bcf90. Task-number: QTBUG-65917 Task-number: QTBUG-55967 Change-Id: I65c75d796634ecf1a90a72fef8ff3e6e89de11c4 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Add support for Windows UI AutomationAndre de la Rocha2017-11-141-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replaces the Qt Accessibility Windows back end, formerly based on legacy MSAA, with a new implementation based on UI Automation. Fixes issues with accessibility tools like screen readers and magnifiers, and with the automatic showing and hiding of the virtual keyboard in touchscreen-based Windows computers. [ChangeLog][Windows] The Windows Accessibility back end, formerly based on Microsoft Active Accessibility, was replaced with a new implementation based on Microsoft UI Automation. Task-number: QTPM-487 Task-number: QTBUG-53024 Task-number: QTBUG-43190 Task-number: QTBUG-61926 Task-number: QTBUG-38499 Task-number: QTBUG-38337 Task-number: QTBUG-38501 Task-number: QTBUG-38502 Task-number: QTBUG-38504 Task-number: QTBUG-38505 Task-number: QTBUG-38507 Change-Id: I20b4f8f5e938fef791c6e9c577fcd919140999bd Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* | Merge remote-tracking branch 'origin/5.10' into devAllan Sandfeld Jensen2017-10-241-1/+3
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/windows/qwindowsmousehandler.cpp src/plugins/platforms/xcb/qxcbimage.cpp tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/manual/qtabletevent/regular_widgets/main.cpp Done-with: Friedemann Kleint<Friedemann.Kleint@qt.io> Done-with: Mårten Nordheim<marten.nordheim@qt.io> Change-Id: I5b2499513a92c590ed0756f7d2e93c35a64b7f30
| * Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-231-1/+3
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/direct2d/direct2d.pro src/plugins/platforms/ios/qiosclipboard.mm src/plugins/platforms/windows/windows.pro Change-Id: Idffa03b3990bd642784f528821c5446b2e1008ef
| | * Windows QPA: Fix build with -no-feature-tableteventFriedemann Kleint2017-10-201-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | Guard #include by QT_CONFIG. Task-number: QTBUG-63874 Change-Id: I33f4a4c4fbdae3d25874ee9cdc3f1c7e1ab783e3 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | | Windows QPA: Clean up code checking for the OS versionFriedemann Kleint2017-10-181-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Use QOperatingSystemVersion for comparisons and remove code for versions < Windows 7. Change-Id: I5a5e3d08a29accd42f170da3ee9c9021ca499f82 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Jake Petroules <jake.petroules@qt.io>