summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowsintegration.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2016-04-01 14:53:35 +0200
committerJędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>2016-04-05 07:13:00 +0000
commit08a62af7c58927c37a92a5749bc87be1ae3d6d2d (patch)
treeb9474d4239d57f292d98d435bc272250fd935122 /src/plugins/platforms/windows/qwindowsintegration.cpp
parente8e09918c01f14e9d8a7019b16ab3cef9bc7f8cd (diff)
Windows QPA: Don't send geometry change after window creation for maximized/fullscreen.
For these states, geometry change will be sent from the code called by setWindowState(); the geometry obtained immediately after window creation is then no longer valid. Task-number: QTBUG-52231 Change-Id: Ia7cbe95e73c5dd4126bb63d448b83f2cab6a53a1 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsintegration.cpp')
-rw-r--r--src/plugins/platforms/windows/qwindowsintegration.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/plugins/platforms/windows/qwindowsintegration.cpp b/src/plugins/platforms/windows/qwindowsintegration.cpp
index 27ec258f37..bf238c3e77 100644
--- a/src/plugins/platforms/windows/qwindowsintegration.cpp
+++ b/src/plugins/platforms/windows/qwindowsintegration.cpp
@@ -318,10 +318,14 @@ QPlatformWindow *QWindowsIntegration::createPlatformWindow(QWindow *window) cons
if (requested.flags != obtained.flags)
window->setFlags(obtained.flags);
- // Trigger geometry/screen change signals of QWindow.
+ // Trigger geometry change (unless it has a special state in which case setWindowState()
+ // will send the message) and screen change signals of QWindow.
if ((obtained.flags & Qt::Desktop) != Qt::Desktop) {
- if (requested.geometry != obtained.geometry)
+ const Qt::WindowState state = window->windowState();
+ if (state != Qt::WindowMaximized && state != Qt::WindowFullScreen
+ && requested.geometry != obtained.geometry) {
QWindowSystemInterface::handleGeometryChange(window, obtained.geometry);
+ }
QPlatformScreen *screen = result->screenForGeometry(obtained.geometry);
if (screen && result->screen() != screen)
QWindowSystemInterface::handleWindowScreenChanged(window, screen->screen());