summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows
Commit message (Collapse)AuthorAgeFilesLines
* 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>
| * Windows QPA: Fix handling of VK_DECIMAL/VK_SEPARATORFriedemann Kleint2018-04-251-2/+2
| | | | | | | | | | | | | | | | | | Remove the hardcoded mapping from the key table for fallback keys since the keys are locale-dependent. Task-number: QTBUG-57992 Change-Id: I016ab5f7f7e8abfd30f6416d2e7597db7deecb9b Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-04-241-0/+8
|\| | | | | | | Change-Id: If950406391f79d99f0101f0b6755395accb26f34
| * Windows QPA: Fix Korean IME removing words when using CTRL shortcutsFriedemann Kleint2018-04-231-0/+8
| | | | | | | | | | | | | | | | | | Ignore the WM_IME_ENDCOMPOSITION message in that case. Done-with: Tobias Koenig <tobias.koenig@kdab.com> Task-number: QTBUG-58300 Change-Id: I9506754a149905222a324b85634964fce398d3ac Reviewed-by: Liang Qi <liang.qi@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-04-224-20/+82
|\| | | | | | | Change-Id: Id32f0ae002772444c0b61cd132ef81f96fe3b895
| * Windows QPA: Fix ambiguous shortcut overload warnings for ALT-keysFriedemann Kleint2018-04-201-2/+13
| | | | | | | | | | | | | | | | | | | | | | Use the match with the least modifiers (prefer Shift+9 over Alt + Shift + 9) resulting in more missing modifiers. Task-number: QTBUG-67200 Change-Id: I90463c0dfaadda29dcd24a08ba35c91fac8bd04c Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| * Windows QPA: Fix duplicate/missing native eventsFriedemann Kleint2018-04-204-18/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-04-062-0/+3
|\| | | | | | | Change-Id: Ic811cd444e523b904211797112bba6aaec85dddd
| * Windows QPA: Fix override cursor not working when re-entering the windowFriedemann Kleint2018-04-052-0/+3
| | | | | | | | | | | | | | | | | | Return early from QWindowsWindow::applyCursor() when an override cursor is set. Task-number: QTBUG-67467 Change-Id: I0d3ceead8bbbd3c6295c216a944a1ef15b6f8190 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-03-311-11/+7
|\| | | | | | | Change-Id: I33b47095efdfe0ba698c6a88ca41ec911f432208
| * Windows: handle multiple transient children when closing windowsMauro Persano2018-03-291-11/+7
| | | | | | | | | | | | | | | | | | | | On Windows, we must update the transient children of a window that's about to be destroyed or its transient children will be destroyed as well. This is already being done in the case of a single transient child, but there are still problems when there are more than one. Change-Id: Ib0de6767bf43dca508ecdb87cbdfedb59e9146e8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-03-301-1/+1
|\| | | | | | | Change-Id: If9cc79a7cc098104333821bc3b345f6890f01825
| * Allow compilation with clang-cl disguised as clJürgen Hunold2018-03-281-1/+1
| | | | | | | | | | | | Task-number: QTBUG-63512 Change-Id: I7e0c4e144262a175c39508090c935c73186fac65 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Windows QPA: Refactor the tablet codeFriedemann Kleint2018-03-282-26/+24
| | | | | | | | | | | | | | | | | | | | - 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>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-03-212-5/+1
|\| | | | | | | Change-Id: I35a6555e3885e489f88aa9b4b0142e1017f7a959
| * Fix subpixel rendering on Windows/FreeTypeSergio Martins2018-03-201-4/+0
| | | | | | | | | | | | | | | | | | | | FT_LCD_FILTER_H wasn't defined because we weren't including the header. To fix it just remove the checks, as was done for Linux and assume sub-pixel is there. If it's not then no harm done, it won't use any. Change-Id: I76f50cb17e41621c45c03cb7d5c75c110557ea68 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@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>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-03-182-11/+36
|\| | | | | | | Change-Id: Icf3b9346117ce7149d8687e4cfa182e7586713f3
| * Windows QPA: Improve tablet mode detectionFriedemann Kleint2018-03-172-11/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-03-153-6/+23
|\| | | | | | | Change-Id: I8b5a10d897a926078895ae41f48cdbd2474902b8
| * QWindowWindow: Avoid resize events from the ctorLaszlo Agocs2018-03-131-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When calling showFullScreen(), the setwindowStates call in the QWindowsWindow constructor led to generating a resize event. This is pretty bad for example when QOpenGLWindow is involved since the QWindow's platformWindow member is not even set yet (handle() == nullptr) so everything related to OpenGL contexts starts failing (as there is no underlying platform window yet as far as the QWindow is concerned). In short, generating geometry changes from the platformwindow ctor is a bad idea. Use initialize() instead for that. Task-number: QTBUG-67027 Change-Id: I35d11949213eb21f81b2ff2d4f2282cb36510210 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * Windows QPA: Fix QWindowsWindowFunctions::SetHasBorderInFullScreen() to work ↵Friedemann Kleint2018-03-132-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in all cases - Directly apply the flag in case the platform window exists and is in full screen. - Store as a dynamic property in case the platform window is not created yet. Amends 69839e55c13000ee9bf8d8e9d74b70096a92ae51. Task-number: QTBUG-41309 Task-number: QTBUG-66557 Change-Id: I162baecfae4d07a5d5b59c5401bdb605faa7ab68 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Andy Shaw <andy.shaw@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.11' into devQt Forward Merge Bot2018-03-122-25/+83
|\| | | | | | | Change-Id: Ic193ccc3e9e3a86e15a002d599c13f35940e1eab
| * Windows QPA: Output more information when initializing tabletsFriedemann Kleint2018-03-101-25/+74
| | | | | | | | | | | | | | Add a debug operator for the LOGCONTEXT. Change-Id: I93d567692f35c69687709800d80bc93487c8f906 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * Windows QPA: GL: Fix setting the color depths for the GDI fallbackFriedemann Kleint2018-03-101-0/+9
| | | | | | | | | | | | | | | | | | Set the color buffer depths on the PIXELFORMATDESCRIPTOR for the fallback code path (-platform windows:gl=gdi). Task-number: QTBUG-66797 Change-Id: Idccd94fdf121803af1c19e34cc86b6f06ca88d90 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-03-084-3/+18
|\| | | | | | | Change-Id: Idf471ca5c6cf211813466b539ce45bdc1ae9b97c
| * Windows QPA: Fix scaling of tablet coordinates for High DPI scalingFriedemann Kleint2018-03-073-2/+16
| | | | | | | | | | | | | | | | | | | | Determine the virtual desktop geometry in native pixels from the QPlatformScreen siblings. Use the platform window to determine the local position. Task-number: QTBUG-36937 Change-Id: Ic250f1b41d8e74099558796112dbd70a7e1f6956 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * Windows QPA: Fix sending of the mouse release in case of a DropFriedemann Kleint2018-03-071-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Use the new API of QWindowSystemInterface to send the release event which does not depend on the state of QGuiApplicationPrivate::mouse_buttons. Amends 1f6bd8bfb2206480ca5b5c267da38659e6cff20e. Task-number: QTBUG-66447 Change-Id: Iae889ea416b633c9307da9535dfb51ad1dbf288e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-03-021-0/+7
|\| | | | | | | Change-Id: I42ec9e6aafc203465cbeb88af70c7af26b7df8ed
| * Windows QPA: Fix setting the separator property on native menusFriedemann Kleint2018-03-011-0/+7
| | | | | | | | | | | | | | | | Apply the setting in QWindowsMenuItem::setIsSeparator(). Task-number: QTBUG-66642 Change-Id: I023fe88bd85ad82cfb4a80418a892dcf21853ba5 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-02-281-1/+15
|\| | | | | | | Change-Id: I1ce43c8a214a869c5c4ac4245bb92c88c6bc6999
| * Windows QPA: Ensure a mouse release event is sent after DnDFriedemann Kleint2018-02-261-1/+15
| | | | | | | | | | | | | | | | | | | | Windows does not send a mouse release by itself, which can leave Quick controls believing the mouse is still pressed. Synthesize an event. Task-number: QTBUG-66447 Change-Id: Ia865edddc0c77a1b42b9ad2c38323379e74b6704 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-02-221-0/+1
|\| | | | | | | Change-Id: Iec636692e8b7d1fe1bc0476e49c5054a5892d639
| * Windows QPA: Fix accessibility being triggered by IMEFriedemann Kleint2018-02-211-0/+1
| | | | | | | | | | | | | | Add missing break. Change-Id: Ib17e348e64379abded41f6c044de59f9ee1dd8fc Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-02-164-9/+33
|\| | | | | | | | | | | | | Conflicts: src/corelib/tools/tools.pri Change-Id: I705630f9cecbf0ce51a22fc6116b8c49611259e9
| * Merge remote-tracking branch 'origin/5.10' into 5.11Liang Qi2018-02-153-4/+9
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-02-071-1/+1
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qcocoamenu.mm Change-Id: I11c5f8466c5b51e13e5ef6a8fc6e3f2dd79122a7