summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowswindow.cpp
diff options
context:
space:
mode:
authorAxel Spoerl <[email protected]>2024-07-10 12:10:39 +0000
committerLiang Qi <[email protected]>2024-07-16 23:17:21 +0000
commit7d7be38d95eb82ef3e0be5250440072d8b5bc4b2 (patch)
tree42e7827334adc44d10100f463f60a49519746021 /src/plugins/platforms/windows/qwindowswindow.cpp
parent49d5b0a5a10634841122bbbc5e986ce307e7017a (diff)
Revert "Update window state in QWindowsWindow and QXcbWindow geometry setters"
This reverts commit 99c8ffb9f259760e45618f0988bbd79237d6d291. It fixed QTBUG-104201, which in essence pointed out a state mismatch between widgets and platform windows on Linux (X11 and wayland). Mismatches occurred in the margins between calls to QWidget and async screen rendering: While the widget layer reported the expected size, the platform layer did so only after the rendering thread had finished. As mentioned in the comments of QTBUG-104201, the state mismatch is predictable, temporary and consistent. By bridging the time gab, an async operation was made to look synchronous. That gave more comfort to application developers. By oversight, it broke code that relied on the platform window state reflecting physical rendering. This has caused QTBUG-126479 as a regression. Both purposes can't be served at the same time: The platform window state either reflects rendering, or the expected state. It's therefore justified to revert. Reason for revert: <Causes QTBUG-126479> Pick-to: 6.8 6.7 6.5 Fixes: QTBUG-126479 Task-number: QTBUG-104201 Change-Id: I22380a6a463822a1cb4be90a44d2775954c7ca82 Reviewed-by: Liang Qi <[email protected]>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowswindow.cpp')
-rw-r--r--src/plugins/platforms/windows/qwindowswindow.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp
index 05d7ccae869..066846ef7bb 100644
--- a/src/plugins/platforms/windows/qwindowswindow.cpp
+++ b/src/plugins/platforms/windows/qwindowswindow.cpp
@@ -2121,12 +2121,8 @@ void QWindowsWindow::setGeometry(const QRect &rectIn)
const QMargins margins = frameMargins();
rect.moveTopLeft(rect.topLeft() + QPoint(margins.left(), margins.top()));
}
-
if (m_windowState & Qt::WindowMinimized)
m_data.geometry = rect; // Otherwise set by handleGeometryChange() triggered by event.
- else
- setWindowState(Qt::WindowNoState);// Update window state to WindowNoState unless minimized
-
if (m_data.hwnd) {
// A ResizeEvent with resulting geometry will be sent. If we cannot
// achieve that size (for example, window title minimal constraint),