summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowswindow.cpp
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: Send screen change before geometry changeMorten Sørvig2022-05-101-3/+3
| | | | | | | | | | | | | | | | | | Fix bug where the device independent QWindow size was set incorrectly, due to usage of incorrect screen and scale factor. This could happen when a window's screen was set to QGuiApplication::primaryScreen() as a fallback, before QWindowsWindow::initialize() would determine the correct screen. By sending the screen change first we make sure that that QWindowSystemInterface::handleGeeometryChange() uses the correct screen for the window. Change-Id: I5520ae67a4db60903d38db856fc314c75a3c0219 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Piotr Srebrny <piotr.srebrny@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Windows: Fix pop-up windows being incorrectly moved to primary displayAndré de la Rocha2022-05-051-1/+1
| | | | | | | | | | | | Amends a previous workaround used with AMD graphic adapters, which under some circumstances could incorrectly move pop-up windows and cause issues with menus. Fixes: QTBUG-97533 Pick-to: 6.2 6.3 Change-Id: Icc83198913b0e78ae3d7c0679e46f8b46b7015bf Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Windows QPA: Add convenient overload to query window frameYuhang Zhao2022-03-011-0/+10
| | | | | | | | | | | | To be used in a later commit. As a drive-by, return early in the frameOnPrimaryScreen overload to avoid calling GetWindowLong in cases we don't need them. Pick-to: 6.3 6.2 Change-Id: Ia69f4acbbf3e044073f818f357e614d4c6680d21 Reviewed-by: André de la Rocha <andre.rocha@qt.io>
* Windows QPA: fix window style correction for context help buttonYuhang Zhao2022-03-011-3/+8
| | | | | | | | | | | | | | According to Microsoft Docs [1][2], WS_MINIMIZEBOX and WS_MAXIMIZEBOX must be accompanied by the WS_SYSMENU style, and the WS_EX_CONTEXTHELP style is not compatible with WS_MINIMIZEBOX and WS_MAXIMIZEBOX. This patch adds additional checks for these situations. [1] https://docs.microsoft.com/en-us/windows/win32/winmsg/window-styles [2] https://docs.microsoft.com/en-us/windows/win32/winmsg/extended-window-styles Pick-to: 6.3 6.2 Change-Id: If32f8b42e25cfc67ffd1e84cc4b061f21a01042a Reviewed-by: André de la Rocha <andre.rocha@qt.io>
* Windows QPA: Use less magic numberYuhang Zhao2022-03-011-19/+21
| | | | | | | | | | | | | | | | | | | The correct calculation of the invisible frame margin and the window border width (they are the same thing actually) is the thickness of the size frame plus the thickness of the padded border. When DPI is 96, both of them is 4px and thus the invisible frame margin and window border width is 8px. So previously the empirical magic number can work normally is because the error is very small. It's not a big thing because even on a high DPI screen the error is still very small. For example, on my 4K monitor with 200% scaling, the error is only 2px, human eyes almost can't find the visual difference. But since we now know how to calculate these values correctly, let's use the correct calculation instead. The magic numbers and empirical expressions just make people confused. Pick-to: 6.3 6.2 Change-Id: Ieda4796231935f2ad1b6f28e4aa4af5b5bce2256 Reviewed-by: André de la Rocha <andre.rocha@qt.io>
* Windows QPA: More debug enhancementsYuhang Zhao2022-02-251-12/+61
| | | | | | | Pick-to: 6.3 Change-Id: Ibf03fa82f14cf704267b85348ce11ee2d505ff24 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Windows QPA: Calculate window frame for frameless windows the same for all ↵Viktor Arvidsson2022-02-221-13/+19
| | | | | | | | | | | | | | | | | | | | | | code paths When we add the WS_THICKFRAME/WS_CAPTION window flags to a frameless window the return value of AdjustWindowRectEx is no longer 0. This works fine when creating the window since the version of QWindowsGeometryHint::frame used during creation checks the FramelessWindowHint, however later when the window changes screen, the screen change code checks the fullFrameMargins which uses a version of QWindowsGeometryHint::frame that does not early out, causing a missmatch in the geometries of the backing store and platform window. This fixes aero snapping shortcuts for frameless windows on multi monitor setups. Fixes: QTBUG-84466 Pick-to: 6.2 6.3 Change-Id: I2357ea32669e4676645549996a3ac6073f3df15c Reviewed-by: André de la Rocha <andre.rocha@qt.io>
* Windows QPA: Correct mistake when calculating minmaxinfoViktor Arvidsson2022-02-141-1/+1
| | | | | | | | | | | | | | | Amends 46e9852a1d04357c98b2c62338e1e2af0de9b486 The previous code would fail if the windows taskbars are placed to the top or left on the screen. The mistake was missed because Windows seems to adjust the window position automatically in case the window handles WM_NCCALCSIZE and returns 0, which was the case for me. Task-number: QTBUG-51327 Pick-to: 5.15 6.2 6.3 Change-Id: I38ef974f7518be63a0bacf080f3359c219284078 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Windows QPA: Fix frameless maximize on secondary screensViktor Arvidsson2022-02-111-13/+11
| | | | | | | | | | | | | | Frameless windows shouldn't cover the taskbar when maximized. This has been fixed for the main screen in the past but did not work for secondary screens. According to the code the MINMAXINFO is only available for the main screen but I believe this is a misunderstanding of the Windows documentation. Besides we use QScreen::availableGeometry() which seems to be correct. Fixes: QTBUG-51327 Pick-to: 5.15 6.2 6.3 Change-Id: Ib2205c480359d1a870dcfcf0312fbe417f650e28 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Windows QPA: Enhance debug informationYuhang Zhao2021-12-171-0/+74
| | | | | | | | | https://docs.microsoft.com/en-us/windows/win32/winmsg/window-styles https://docs.microsoft.com/en-us/windows/win32/winmsg/extended-window-styles https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setwindowpos Change-Id: I54392b36c52c4318c0d2d5489bbfd582ff7bccb3 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Windows QPA: Correctly respond to WM_ERASEBKGNDYuhang Zhao2021-12-151-2/+4
| | | | | | | | | | | | | | | | According to Microsoft Docs [1], applications should return non-zero in response to WM_ERASEBKGND if it processes the message and erases the background and that's indeed the case for Qt. Although I can't see any visual difference, this patch obeys the official documentation at least. [1] https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-erasebkgnd Pick-to: 6.3 6.2 Change-Id: I8aa0bfb25259013bfc2ca4074f05a97c7865159c Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Windows QPA: Fix cursors getting out of sync after restoring override ↵Friedemann Kleint2021-12-081-1/+8
| | | | | | | | | | | | | | cursors on native windows Introduce a flag to QWindowsWindow which forces the cursor to be applied after restoring override cursors. Fixes: QTBUG-98856 Pick-to: 6.2 5.15 Change-Id: Id62cdc2dd01f45324503a542446b1c11a1fe6f44 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Keith Kyzivat <keith.kyzivat@qt.io> Reviewed-by: André de la Rocha <andre.rocha@qt.io>
* Windows QPA: Further cleanup of pre-Win10 codeYuhang Zhao2021-11-241-22/+13
| | | | | | | | | | | | | | | | | Mostly a removal of dynamically loaded Win32 APIs. Since Qt 6's minimum supported platform is Win10 1809 (10.0.17763, code name RS5), all these functions will be available and no need to resolve them at run-time. Things not remove: WinTab functions in "qwindowstabletsupport.cpp". Not my familiar area, so not touch it. Pick-to: 6.2 Task-number: QTBUG-84432 Change-Id: I7ad6c3bc8376f6c0e3ac90f34e22f7628efeb694 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Windows QPA: Set SWP_NOCOPYBITS during resize to avoid jitterYuhang Zhao2021-11-121-1/+6
| | | | | | | | | | | | | Allowing Windows to re-use parts of the client area when resizing might result in jitter. See discussion in: https://stackoverflow.com/questions/53000291/how-to-smooth-ugly-jitter-flicker-jumping-when-resizing-windows-especially-drag Fixes: QTBUG-97774 Pick-to: 6.2 Change-Id: Idc8f0d1953dd0a8b329312d8a9fd0509cc24d81f Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Bump WINVER, _WIN32_WINNT and _WIN32_IE to _WIN32_WINNT_WIN10 (0x0A00)Yuhang Zhao2021-11-101-5/+2
| | | | | | | | | | | And bump NTDDI_VERSION to 0x0A00000B (NTDDI_WIN10_CO) at the same time, to unblock the developers from accessing the latest Windows APIs. Pick-to: 6.2 Change-Id: Ifbc28c8f8b073866871685c020301f5f20dc9591 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* windows qpa: re-apply 8d6e825dMorten Johan Sørvig2021-10-291-0/+2
| | | | | | | | | | | | “Handle invisible child windows gracefully on dpi changes” This fix was accidentally removed by commit cd96d870 “Move VM_DPICHANGE handling to QWindowsWindow”. Fixes: QTBUG-96466 Pick-to: 6.2 Change-Id: I3774f6305631ba47282d43e8480e2acaba517a96 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* windows: Fix typos in source code commentsJonas Kvinge2021-10-121-1/+1
| | | | | Change-Id: I5d83574639d0b1f935843a75217aae70a5925fa0 Reviewed-by: André de la Rocha <andre.rocha@qt.io>
* QWindowsWindow: Fix typo in documentationJonas Kvinge2021-10-121-1/+1
| | | | | | Pick-to: 5.15 6.2 Change-Id: Ib20b2f23e399b295e26b8c29084023e4e1361579 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix programatic geometry change to different DPIMorten Johan Sørvig2021-10-071-8/+26
| | | | | | | | | | | | | | | | | The event flow for programatic window geometry change (e.g. from MoveWindow()) differs from user-interactive geometry change: We still get WM_DPICHANGED, but this event is not preceded by WM_GETDPISCALEDSIZE, so we don’t get to override the window size. However, Qt has already scaled the window size for the new DPI in this case (the scaled size is provided to QWindowsWindow::setGeometry()), so we can omit making second native set-geometry call. Pick-to: 6.2 Change-Id: Ia7d42d7fee49adf757e7fe75d77f1731405ad519 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Handle WM_GETDPISCALEDSIZEMorten Johan Sørvig2021-10-071-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By handling WM_GETDPISCALEDSIZE we can keep QWindow’s device independent size constant across DPI changes. This is done by scaling QPlatformWindow’s native size such that the change of scale factor and change of QPlatformWindow size cancels out. Qt now handles DPI change using two events: WM_GETDPISCALEDSIZE: Compute the new size for the window. WM_DPICHANGED: Apply the new DPI and window geometry. The reason for this complication is that Windows retains control over the window position during the DPI change, in order to e.g. accurately track the cursor position during a screen change. The default WM_GETDPISCALEDSIZE implementation (provided by Windows) scales the win32 window size linearly with the DPI change. We want to use linear scaling as well, however the win32 window size includes the margins, which do not change linearly as the DPI changes. Instead, scale the QPlatformWindow size, and then add the new margins. Pick-to: 6.2 Change-Id: I4f225be8fad56b1fa77e9e3cfd6538a206589d73 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Move VM_DPICHANGE handling to QWindowsWindowMorten Johan Sørvig2021-10-071-0/+27
| | | | | | | | | We want to have as little code in the QWindowsContext event switch as possible. Pick-to: 6.2 Change-Id: I04d578aae81c4ee804310a70bd87ee60b2890b6a Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* qwindowswindow: fix return nullptrGong Weia2021-09-281-1/+1
| | | | | | | fix return nullptr rather than 0 Change-Id: Ic8e04e5b8bc732a7ffba5a708caee4326abf7168 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Make QWindow respect minimumSize again on WindowsMorten Johan Sørvig2021-09-211-0/+2
| | | | | | | | | | Commit 6336b535 accidentally removed a call to applyToMinMaxInfo(). Add it back. Task-number: QTBUG-96441 Pick-to: 6.2.0 6.2 Change-Id: I26a5d121ed3b4cd9e49e3dd8b371abe71d9a482c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Improve WM_DPICHANGED handlingMorten Johan Sørvig2021-08-061-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resize QPlatformWindow on DPI change, so that QWindow size can stay approximately constant. For example, a 100x100 QWindow at 100% scaling will have a 100x100 QPlatformWindow. If the scaling is changed to 200% then the QPlatformWindow is resized to 200x200, while the size of the QWindow stays at at 100x100. In practice the QWindow size will also change slightly, due to inaccuracies in how we adjust for the size of the non-client window area. This will be addressed in a later commit. We can get DPI change independently of screen change, so no resizing should happen in screen change events. Disable the resize code in QGuiApplication for Q_OS_WIN, and remove the WithinDpiChanged flag. The new flow for handling DPI change is: 1) Send screen change (if any), so that the correct screen will be used when calculating scale factors during the following resize. 2) Resize the native window, which will trigger geometry change events, possibly also for the QWindow. 3) Resize child windows; WM_DPICHANGED is sent to top-level windows only. Fixes: QTBUG-89294 Pick-to: 6.2 Change-Id: I0e2d44bae72d20ebdafc3d410db7be9964ad851b Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Track current window DPIMorten Johan Sørvig2021-08-061-0/+2
| | | | | | | | | | The WM_DPICHANGED event gives us the new DPI, but we also need the current DPI in order to determine the scale factor corresponding to the DPI change. Pick-to: 6.2 Change-Id: Ia61388415f57aa739397d3125b8751952e8fd392 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Windows QPA: Remove DwmIsCompositionEnabled() usagesYuhang Zhao2021-07-301-29/+5
| | | | | | | | | | | | | According to Microsoft Docs [1], DWM composition is always enabled and can't be disabled since Windows 8. Now that we are cleaning up pre-Windows 10 code, this apparently needs to be removed as well. [1] https://docs.microsoft.com/en-us/windows/win32/api/dwmapi/nf-dwmapi-dwmiscompositionenabled Task-number: QTBUG-84432 Change-Id: I64dc049e0741600c8d0ae4db0e9e3bc98a211339 Reviewed-by: André de la Rocha <andre.rocha@qt.io>
* Windows QPA: Fix blurry title icons with fractional scale factorFriedemann Kleint2021-01-191-1/+2
| | | | | | | | Request the icon pixmaps with DPR=1. Fixes: QTBUG-90363 Change-Id: I789a72e2ed3379c81c68e1074069823bf633cf2f Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Revert "Windows QPA: Call QWSI::flushWindowSystemEvents() from WM_PAINT for ↵Morten Johan Sørvig2021-01-111-3/+2
| | | | | | | | | | | | | | | | | | | full update only" This reverts commit a81dfb32d6f9e7a407567511c20b59e537f6a063. Paint immediately on WM_PAINT in all cases in order to avoid flicker on resize. The cases mentioned in commit a81dfb should no longer apply: - QTBUG-38327: QGLWidget is not supported in Qt 6. - QTBUG-39842: Fixed by using ExcludeUserInputEvents. Fixes: QTBUG-89688 Change-Id: If82cf7703d6663982769048e86a7060223730ce7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Add a dedicated QWindow surface type for D3DLaszlo Agocs2021-01-041-15/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Even though there is no D3D-specific logic in the windows platform plugin, meaning a QWindow with either OpenGLSurface or VulkanSurface (or anything really) is DXGI/D3D-compatible, it now looks like it is beneficial, and more future proof, if there is a dedicated surface type. As the linked report shows, there are OpenGL-specific workarounds accumulated in the platform plugin, while not being clear if these are relevant to non-OpenGL content, or if they are relevant at all still. (and some of these can be difficult/impossible to retest and verify in practice) When D3D-based windows use the same surface type, all these are active for those windows as well, while Vulkan-based windows have their own type and so some of these old workarounds are not active for those. To reduce confusion, having a dedicated surface type for D3D as well allows the logic to skip the old OpenGL workarounds, giving us (and users) a more clear overall behavior when it comes to OpenGL vs. Vulkan vs. D3D. The change is compatible with any existing code in other modules because any code that uses OpenGLSurface for D3D will continue to work, using the new type can be introduced incrementally. Task-number: QTBUG-89715 Change-Id: Ieba86a580bf5a3636730952184dc3a3ab7669b26 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Windows QPA: Enable toggling Windows transparencyFriedemann Kleint2020-09-081-2/+6
| | | | | | | | | | | | | | Change QWindowsWindow::format() to return the QWindow's requested format instead of storing it as do the other platforms. This will cause the alpha (layered flag) to be adapted in QWindowsBackingStore::flush(). Note that it does not fix the issue; the window does not update correctly after changing WS_EX_LAYERED. Pick-to: 5.15 Task-number: QTBUG-60822 Change-Id: I3facd93f993b3b422b6818d55c1bce884fb57234 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Windows QPA: Move dark mode handling to the new interfaceFriedemann Kleint2020-07-251-1/+1
| | | | | | | | | | Move options to new interface, making them settable from code on this occasion. Task-number: QTBUG-83252 Change-Id: Idd80667c502a8cde5d7c66d7e597ea34c22738e7 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Windows QPA: Move window properties to the new interfacesFriedemann Kleint2020-07-241-0/+10
| | | | | | | | Affects the custom margin used by QWizard. Task-number: QTBUG-83252 Change-Id: Iffda043f106282f682e119ec955fa2b2eb0f259e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Add QPlatformInterface::Private::QWindowsWindowFriedemann Kleint2020-07-221-1/+17
| | | | | | | | Remove QWindowsWindowFunctions Task-number: QTBUG-83252 Change-Id: Iacfdf2e0f430208901c182e461c4617e1ef526ce Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Windows QPA: Move the touch types API from platformheaders into QtGuiFriedemann Kleint2020-07-221-18/+36
| | | | | | | | | | | | | | | | | | | | Change TouchWindowTouchType(s) to be (global) property of QGuiApplication's native Windows interface since it does not make sense to set it per window. It appears the previous code setting the types per Window has never worked since registerTouchWindow() bailed out due to the checks for the flags TouchRegistered and IsTouchWindow() (setting in HCBT_CREATEWND). In addition, registering windows for touch after plugging in a device would not observe the setting. Move the checks around to make this work. Task-number: QTBUG-41433 Task-number: QTBUG-48849 Task-number: QTBUG-83252 Change-Id: I4306fdf13208f6eef22655875f3bd1769270e617 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Start the native interface QWindowsApplicationFriedemann Kleint2020-07-211-1/+2
| | | | | | | | | | | | 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>
* Add ; to Q_UNUSEDLars Schmertmann2020-07-071-2/+2
| | | | | | | | This is required to remove the ; from the macro with Qt 6. Task-number: QTBUG-82978 Change-Id: I3f0b6717956ca8fa486bed9817b89dfa19f5e0e1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix build with -no-opengl on WindowsPaul Olav Tvete2020-06-161-0/+2
| | | | | | Change-Id: Ib29012361a2b7f2f0b0da53a7736bb3f3384ae38 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Windows: Update the hasFrame setting when changing window flagsAndy Shaw2020-05-191-0/+1
| | | | | | | | | | | | Since changing the window flags can make it frameless or have a frame then it should ensure that the hasFrame setting is updated accordingly when the window flags do. Change-Id: I7bf4995d7967623b117426d8750e63fa97967e2c Pick-to: 5.15 Pick-to: 5.12 Fixes: QTBUG-84029 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-04-221-8/+15
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/widgets/qabstractbutton.cpp src/widgets/widgets/qbuttongroup.cpp src/widgets/widgets/qbuttongroup.h src/widgets/widgets/qsplashscreen.cpp tests/auto/widgets/widgets/qbuttongroup/tst_qbuttongroup.cpp tests/benchmarks/opengl/main.cpp Needed update: src/plugins/platforms/cocoa/CMakeLists.txt Change-Id: I7be4baebb63844ec2b3e0de859ca9de1bc730bb5
| * Windows QPA: Fix geometry when firing a full exposeFriedemann Kleint2020-04-151-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | There are several places in the code where a full expose event is fired, but the geometry in logical coordinates is used (pre-dating High DPI scaling). Fix by introducing a helper function for it. Task-number: QTBUG-83449 Change-Id: Ie8bb306de0b9b2b85306ed1bb6ba71181b76a958 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| * Windows QPA: Fix showing translucent windows maximized/full screenFriedemann Kleint2020-04-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Translucent (layered) windows require an additional expose event. This was sent with the wrong size since the order of handleGeometryChange(), handleWindowStateChange() in handleResized was wrong. Fixes: QTBUG-83449 Change-Id: Iafd3fa8c0893aa28079201f73b7eb529087ba079 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| * Windows QPA: Fix restoring from fullscreen in High DPI setupsFriedemann Kleint2020-04-151-2/+4
| | | | | | | | | | | | | | | | | | | | The logic for checking whether the saved geometry (native pixels) is still within a screen compared them against logical coordinates. Work with the platform screen geometry instead. Fixes: QTBUG-83448 Change-Id: Ib68f967d1a33a490f88a7bec6dcc788788a10389 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-04-081-8/+11
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/opengl/doc/src/cube.qdoc src/corelib/global/qlibraryinfo.cpp src/corelib/text/qbytearray_p.h src/corelib/text/qlocale_data_p.h src/corelib/time/qhijricalendar_data_p.h src/corelib/time/qjalalicalendar_data_p.h src/corelib/time/qromancalendar_data_p.h src/network/ssl/qsslcertificate.h src/widgets/doc/src/graphicsview.qdoc src/widgets/widgets/qcombobox.cpp src/widgets/widgets/qcombobox.h tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro tests/manual/diaglib/debugproxystyle.cpp tests/manual/diaglib/qwidgetdump.cpp tests/manual/diaglib/qwindowdump.cpp tests/manual/diaglib/textdump.cpp util/locale_database/cldr2qlocalexml.py util/locale_database/qlocalexml.py util/locale_database/qlocalexml2cpp.py Resolution of util/locale_database/ are based on: https://codereview.qt-project.org/c/qt/qtbase/+/294250 and src/corelib/{text,time}/*_data_p.h were then regenerated by running those scripts. Updated CMakeLists.txt in each of tests/auto/corelib/serialization/qcborstreamreader/ tests/auto/corelib/serialization/qcborvalue/ tests/auto/gui/kernel/ and generated new ones in each of tests/auto/gui/kernel/qaddpostroutine/ tests/auto/gui/kernel/qhighdpiscaling/ tests/libfuzzer/corelib/text/qregularexpression/optimize/ tests/libfuzzer/gui/painting/qcolorspace/fromiccprofile/ tests/libfuzzer/gui/text/qtextdocument/sethtml/ tests/libfuzzer/gui/text/qtextdocument/setmarkdown/ tests/libfuzzer/gui/text/qtextlayout/beginlayout/ by running util/cmake/pro2cmake.py on their changed .pro files. Changed target name in tests/auto/gui/kernel/qaction/qaction.pro tests/auto/gui/kernel/qaction/qactiongroup.pro tests/auto/gui/kernel/qshortcut/qshortcut.pro to ensure unique target names for CMake Changed tst_QComboBox::currentIndex to not test the currentIndexChanged(QString), as that one does not exist in Qt 6 anymore. Change-Id: I9a85705484855ae1dc874a81f49d27a50b0dcff7
| * qpa: Remove references to lighthouseTor Arne Vestbø2020-04-031-7/+0
| | | | | | | | | | Change-Id: I37646113f626c878883cff49f4e186ec71bcfa15 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-03-181-1/+11
| |\ | | | | | | | | | Change-Id: Iaab37b633a8286c2c21425aaac34d30529a3ea82
| | * Windows QPA: Fix broken frame geometry when moving windows with native menusFriedemann Kleint2020-03-131-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QWindowsWindow::updateFullFrameMargins() which is called from the screen changed handling does not take native menus into account. Since the size of the menu is not known when using EnableNonClientDpiScaling(), obtaining the correct frame size requires triggering a WM_NCCALCSIZE message. Extract the helper forceNcCalcSize() from QWindowsMenu and use that from updateFullFrameMargins() in case menus are present. Amends d2fd9b1b9818b3ec88487967e010f66e92952f55. Fixes: QTBUG-82580 Change-Id: I306f1faf84e26c88608cb22ffd42eccc848905c3 Reviewed-by: André de la Rocha <andre.rocha@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devLars Knoll2020-03-041-3/+1
|\| | | | | | | | | | | Change-Id: I99ee6f8b4bdc372437ee60d1feab931487fe55c4
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-02-291-3/+1
| |\| | | | | | | | | | Change-Id: I851c0328c3c38ea67b5ad115b205ac6a1262706e
| | * qwindowswindow: Fix screen changes between different DPI screens for native ↵Oliver Wolff2020-02-271-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | windows When asynchronous events are used for notifications about screen changes it is possible that we run into a race condition where the scale factor has not yet been updated for the new screen. This results in a wrong geometry being set for the window that is moved between the screens. We do not have that problem with synchronous events. Change-Id: I4eb6d2a7cb49517d271901b479f973e273a0926a Amends: 7eed1e40d4d3b6a066bac52995eed7e75d17de2d Task-number: QTBUG-65580 Fixes: QTBUG-82312 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>