summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows
Commit message (Collapse)AuthorAgeFilesLines
* Windows QPA: Fix duplicate Pointer Touch events and missing TouchCancelRomain Pokrzywka2018-08-304-1/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-273-7/+29
| | | | | | | | | | | | | | | | | | 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: Force windows to the main screen in certain AMD GPU setupsAndre de la Rocha2018-08-233-11/+136
| | | | | | | | | | | | A multi-screen setup with an AMD adapter set as the 'main display' leads to using the AMD drivers for OpenGL. This then causes a crash when calling SetPixelFormat and similar for windows located on another adapter's screen. This workaround detects the conditions leading to the crash and moves the window to the main display. Task-number: QTBUG-50371 Change-Id: I4007c490bdcdc13d6e8bce82983b150aa4930338 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Merge remote-tracking branch 'origin/5.11' into 5.12Liang Qi2018-08-221-1/+1
|\ | | | | | | | | | | | | | | | | Conflicts: src/gui/text/qtextengine.cpp tests/auto/corelib/itemmodels/qsortfilterproxymodel_common/tst_qsortfilterproxymodel.cpp tests/auto/corelib/itemmodels/qsortfilterproxymodel_common/tst_qsortfilterproxymodel.h Change-Id: Ib9f968edbb0f3387c89bc25e914321d0738bfadc
| * Windows QPA: Fix mapping of static text accessibility roleAndre de la Rocha2018-08-171-1/+1
| | | | | | | | | | | | | | | | | | QAccessible::StaticText should be mapped to UIA_TextControlTypeId instead of UIA_EditControlTypeId. Task-number: QTBUG-69894 Change-Id: If2f8f55d2be492c02a3af5b1813ca12cf774a33a Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Windows QPA: Add option to detect AltGr key pressesFriedemann Kleint2018-08-216-10/+62
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Modernize the "thread" featureUlf Hermann2018-08-171-3/+3
| | | | | | | | | | | | | | | | | | | | Add it to configure.json and replace all occurrences of QT_NO_THREAD with QT_CONFIG(thread). Add conditions for other features that depend on thread support. Remove conditions where we can use the QMutex and QThreadStorage stubs. Change-Id: I284e5d794fda9a4c6f4a1ab29e55aa686272a0eb Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Windows QPA: Do not double delete the QTouchDeviceJan Arve Sæther2018-08-142-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | drop usages of Q_COMPILER_CLASS_ENUMGatis Paeglis2018-08-142-9/+1
| | | | | | | | | | | | | | It is not relevant anymore. C++11 is a hard requirement for a while already. Change-Id: Idb8fbdcd13398cc85fba583f40c2b5c4dc7c4943 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Windows QPA: fix transientParentHwndMauro Persano2018-08-081-11/+1
| | | | | | | | | | | | | | | | | | | | QWindowsWindow::updateTransientParent retrieves the handle of the topmost owner window, not that of the immediate owner window (which corresponds to the handle of transient parent window). Task-number: QTBUG-69620 Change-Id: I1433098e8e93832d97508ee1782f88ccc000ee3a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.11' into dev" into ↵Liang Qi2018-08-075-21/+35
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-08-075-21/+35
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/corelib/doc/src/objectmodel/signalsandslots.qdoc src/plugins/platforms/cocoa/qcocoamenuloader.mm 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 tests/auto/gui/image/qimage/tst_qimage.cpp Done-with: Gatis Paeglis <gatis.paeglis@qt.io> Change-Id: I9bd24ee9b00d4f26c8f344ce3970aa6e93935ff5
| | * Windows QPA: Fix UIA-to-MSAA accessibility bridgeAndre de la Rocha2018-08-062-16/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to MS sample code, MSAA requests should be replied with UI Automation providers to enable the use the UIA-to-MSAA bridge, in order to support MSAA-only clients. Also changing the mapping of QAccessible::Client from UIA_CustomControlTypeId to UIA_GroupControlTypeId, as it seems more appropriate and avoids an incorrect mapping to a push button type in the UIA-to-MSAA conversion. Change-Id: I5149d250da2d1bd7b14b44ca46e856a81c9be045 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | * Windows: Implement Qt::WindowStaysOnBottomHintFriedemann Kleint2018-08-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set the Z-order to HWND_BOTTOM in that case. Add a doc note stating that it only works for frameless or full screen windows. Task-number: QTBUG-53717 Change-Id: I7abf219a88aac715c51d27d925504da9e91b56f1 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Andre de la Rocha <andre.rocha@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| | * Windows QPA: Fix override cursor being cleared when crossing window bordersFriedemann Kleint2018-07-313-5/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Override cursors can be modified externally when for example crossing window borders. Add helper function to enforce the cursor again to QWindowsWindow::applyCursor() which is called for enter events. Task-number: QTBUG-69637 Change-Id: Ibea4da9f2aac81377002b626daae64b1102f6c2b Reviewed-by: Andre de la Rocha <andre.rocha@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | | Add logging for QPlatformBackingStore::composeAndFlushTor Arne Vestbø2018-08-072-2/+0
|/ / | | | | | | | | Change-Id: I96778296480d2aaad5e01ed15353106bc90d4d2b Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Windows QPA: Fix clang-tidy-warnings about class definitionsFriedemann Kleint2018-08-0627-66/+66
| | | | | | | | | | | | | | | | | | | | - Use ' = default' for trivial constructors/destructors - Remove unneeded destructors - replace virtual by override or add override where applicable - Add Q_DISABLE_COPY Change-Id: Ic7a61579dbc845769beada4fc79bb5dd310e5e52 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Windows QPA: Fix some clang-tidy-warningsFriedemann Kleint2018-08-0615-69/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Replace index-based loops by range-based for - Change else if to if after return/break/continue or simplify - Fix indentation - Do not check for non-null before invoking delete on pointer - Use isEmpty() instead size() to check for empty containers - Remove C-style casts - Use raw string literal - Do not repeat type in return, use {} instead - Reference local variables by const ref where applicable Change-Id: I5cc4b4026a10bddb561ba1ba8ec137e0d4119f94 Reviewed-by: Miguel Costa <miguel.costa@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Merge branch '5.11' into devEdward Welbourne2018-07-313-29/+48
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-242-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Fix invisible element being included in the UI Automation treeAndre de la Rocha2018-07-241-22/+45
| | | | | | | | | | | | | | | | | | | | | | When an element is not visible then it should not be shown in the element tree at all when using tools like Inspect. Also, the IsOffscreen property was hardcoded to false instead of reflecting the actual object offscreen state. Task-number: QTBUG-69537 Change-Id: If6e8a4685c0505ee2b99dfbb8bf2b5d0f4112b1e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Add Windows Pointer Input Messages supportAndre de la Rocha2018-07-1210-64/+831
| | | | | | | | | | | | | | | | | | | | 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-027-64/+124
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Fix automatic showing/hiding of the Windows 10 on-screen keyboardAndre de la Rocha2018-06-283-38/+74
| | | | | | | | | | | | | | | | | | | | | | | | The automatic showing/hiding of the built-in on-screen keyboard in touchscreen-based Windows computers, like the Microsoft Surface line, has stopped working after recent Windows updates. The OSK no longer seems to rely on UI Automation properties to detect text widgets. However, it can be triggered by showing an invisible caret. Task-number: QTBUG-68808 Change-Id: Ia604d21e314965dcdc61f1ced050cc3ed771f567 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * Windows QPA/GL: Fix build with MinGW/g++ 8.1 x64Friedemann Kleint2018-06-263-25/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix warnings about invalid function type casts (return types conflicting with the PROC returned by wglGetProcAddress()) like: qwindowsglcontext.cpp:1250:138: error: cast between incompatible function types from 'PROC' {aka 'long long int (*)()'} to 'GLenum (*)()' {aka 'unsigned int (*)()'} [-Werror=cast-function-type] m_getGraphicsResetStatus = (GLenum (APIENTRY *)()) QOpenGLStaticContext::opengl32.wglGetProcAddress("glGetGraphicsResetStatusARB"); by introducing nested casts. Task-number: QTBUG-68742 Task-number: QTQAINFRA-2095 Change-Id: I7c51836f2b9f7e2a6fa17c5108d59b23c42fb99d Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
| * 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-2737-230/+220
| | | | | | | | | | | | | | | | | | 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-227-15/+21
| | | | | | | | | | | | | | ...for consistency with the other platform plugins. Change-Id: I85946d610a62c19140618c83f80c4aa63fce4bc3 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-06-077-10/+23
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/corelib/kernel/qeventdispatcher_cf.mm src/gui/kernel/qguiapplication_p.h src/gui/kernel/qwindowsysteminterface.cpp src/gui/kernel/qwindowsysteminterface.h src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/cocoa/qnswindowdelegate.mm src/plugins/platforms/ios/qioseventdispatcher.mm src/plugins/platforms/windows/qwindowsdrag.h src/plugins/platforms/windows/qwindowsinternalmimedata.h src/plugins/platforms/windows/qwindowsmime.cpp src/plugins/platforms/winrt/qwinrtscreen.cpp Change-Id: Ic817f265c2386e83839d2bb9ef7419cb29705246
| * Fix QWindowsWindow::requestActivateWindow()Sergiy Korobov2018-06-051-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | QWindowsWindow::requestActivateWindow() does not work correct if QWindowsWindowFunctions::AlwaysActivateWindow is passed as a parameter to QWindowsWindowFunctions::setWindowActivationBehavior(). When the calling process is not the active process, only the taskbar entry is flashed. It is not correct. The window should be always activated, even when the calling process is not the active process. Task-number: QTBUG-37435 Task-number: QTBUG-14062 Change-Id: I7a321d7bac744a7776278210b1b5a2fd4288aa43 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * Fix QWindowsNativeInterface::platformFunction()Sergiy Korobov2018-06-011-0/+2
| | | | | | | | | | | | | | | | | | | | QWindowsWindowFunctions::setWindowActivationBehavior() does not work because QWindowsNativeInterface::platformFunction() is broken. Task-number: QTBUG-37435 Task-number: QTBUG-14062 Change-Id: Id5688316654ea8ad47d5c68894c376cb83e3583a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * Make sure we can build with -no-feature-draganddropJoerg Bornemann2018-05-296-10/+12
| | | | | | | | | | | | | | | | | | We move QInternalMimeData to a separate file, because this class is used, even if draganddrop is disabled. From now on, include qinternalmimedata_p.h instead of qdnd_p.h for QInternalMimeData. Change-Id: I594e08e2e90d574dc445119091686b4b69e4731b Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | Windows QPA: Fix release button event type after moving windowsFriedemann Kleint2018-05-311-9/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check whether the mouse is inside the window and report MouseButtonRelease or QEvent::NonClientAreaMouseButtonRelease, respectively. The inside case is triggered by programmatically starting a size move via QPlatformWindow::startSystemResize() (QSizeGrip) and was overlooked in 7c3ecf85a770cd7fef01ece935f88d8894de09b2. Complements 45894408913f62f6f25a302d8ed07af57ac7db5d, 7c3ecf85a770cd7fef01ece935f88d8894de09b2. Change-Id: I8f714dc768a163878c2b4a075470bcee2dfbd802 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io> Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-05-242-5/+19
|\| | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/qt_common.prf src/corelib/tools/qstring.cpp src/plugins/platforms/windows/qwindowsmousehandler.cpp src/widgets/widgets/qmainwindowlayout_p.h Change-Id: I5df613008f6336f69b257d08e49a133d033a9d65
| * Windows Platform: Redirect wheel event to a window under mouse cursorAlexandra Cherdantseva2018-05-161-3/+17
| | | | | | | | | | | | | | | | | | | | | | Revert a part of af5c8d04fb0c9ddda58925e4862e857c78a5e563 which affected mouse wheel event redirection. Task-number: QTBUG-63979 Change-Id: Ice88675aadbb8a7477b3758a607db5979d62562c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Alexandra Cherdantseva <neluhus.vagus@gmail.com> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| * Windows QPA: Fix wrong initial size when launched on secondary screenFriedemann Kleint2018-05-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | Send changed events from QPlatformWindow::initialize() synchronously so a protentially changed screen takes effect in QWindow::resize() called by QWidget::show_sys(). Task-number: QTBUG-67777 Change-Id: I889500d458caf0e782bdbc237ce790f0b0bc2d95 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Windows QPA: Fix Qt include statementsFriedemann Kleint2018-05-2385-315/+296
| | | | | | | | | | | | | | | | | | | | | | | | 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: Fix MinGW compilation after ec97be5585Martin Storsjö2018-05-221-0/+1
| | | | | | | | | | | | | | | | | | This fixes compilation that failed due to QOperatingSystemVersion being undeclared. Not sure from where it was transitively included in other builds where it apparently have worked fine though. Change-Id: I32cfb51c4787604d456fffa7a3a8ed09952a0513 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Windows: Add support for invisible window marginsAndre de la Rocha2018-05-184-21/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-163-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Vulkan: share library loading implementationMorten Johan Sørvig2018-05-142-12/+1
| | | | | | | | | | | | | | | | The macOS, Windows, and XCB implementations are identical and can be moved to QBasicPlatformVulkanInstance. Change-Id: Id84b27ffd87f86afe3798c4ad2743ba05e6190d3 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Vulkan: Share destroySurface() implementationMorten Johan Sørvig2018-05-142-18/+1
| | | | | | | | | | | | | | | | The macOS, Windows, and XCB implementations are identical and can be moved to QBasicPlatformVulkanInstance. Change-Id: I1380b2bd03080710084a1458bdce3a362ba5c287 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | macOS: Add QSurfaceType::MetalSurfaceMorten Johan Sørvig2018-05-111-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add API to activate previously added Metal layer implementation. This provides minimal support, and unlike VulkanSurface there is no separate QWindow subclass. What this does do is configure the QWindow to use a Metal layer, and to send expose/update events when the layer content should be redrawn. Qt will also update the layer’s drawableSize and contentsScale when needed. Application code can make use of this by accessing the QWindow layer, which will be a CAMetalLayer: CAMetalLayer *metalLayer = reinterpret_cast<CAMetalLayer *>( reinterpret_cast<NSView *>(window->winId()).layer); Change-Id: I514f5186133c3e610fd4e53ca91fe9c85c6d016e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-05-082-0/+10
|\| | | | | | | | | | | | | | | Conflicts: src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp tests/auto/corelib/io/qresourceengine/qresourceengine_test.pro Change-Id: I3169f709cc2a1b75007cb23c02c4c79b74feeb04
| * Fix building with -no-feature-shortcutJoni Poikelin2018-05-082-0/+10
| | | | | | | | | | Change-Id: I7576055a6d81d6a7a075ebff16ca6b0ced4e984e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Windows QPA: Improve debug output of keyboard shortcut handlingFriedemann Kleint2018-05-081-16/+59
| | | | | | | | | | | | | | | | Add a debug operator for KeyboardLayoutItem and output keys in QWindowsKeyMapper::possibleKeys(). Change-Id: I28215f44da2a9c08a27541ef0e906d37be2bad72 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Move default implementation of update requests to QPlatformWindowTor Arne Vestbø2018-05-072-2/+4
| | | | | | | | | | Change-Id: I4cbb8d2023068288e298ab21f5cd8bc258825c77 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Windows QPA: Use new QPA Dnd APIFriedemann Kleint2018-05-051-29/+22
| | | | | | | | | | | | | | Task-number: QTBUG-57168 Task-number: QTBUG-56244 Change-Id: I84cf811d9e886369a659ecb33ce1778207660922 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-04-261-3/+4
|\| | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm src/plugins/platforms/cocoa/qcocoawindow.mm Change-Id: Ideea96d1b43d47b1d9b34e11c9986a88e240aa71
| * Windows QPA: Add missing calls to keyboard initializationFriedemann Kleint2018-04-251-1/+2
| | | | | | | | | | | | | | | | | | Add calls to changeKeyboard() to the QWindowsKeyMapper constructor and the handling of WM_INPUTLANGCHANGE so that the locale is correctly initialized and changes are processed. Change-Id: Ia30d8c6434ca85165e4882240ae16f9a75dcf4ff Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>