diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-04-26 10:34:58 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-05-16 08:23:42 +0000 |
commit | b1452011282bfd0213b9f35b446e4970cb60d112 (patch) | |
tree | 0dbcabd70a21af4ce4fd15f56e96e75fc2c2354d | |
parent | ae8743bf861a94aa078675d8ebcc0b1cf567aa4d (diff) |
Windows QPA: Fix wrong initial size when launched on secondary screen
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>
-rw-r--r-- | src/plugins/platforms/windows/qwindowswindow.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp index f1762146ec..f8d6ae222e 100644 --- a/src/plugins/platforms/windows/qwindowswindow.cpp +++ b/src/plugins/platforms/windows/qwindowswindow.cpp @@ -1144,11 +1144,11 @@ void QWindowsWindow::initialize() const Qt::WindowState state = w->windowState(); if (state != Qt::WindowMaximized && state != Qt::WindowFullScreen && creationContext->requestedGeometryIn != creationContext->obtainedGeometry) { - QWindowSystemInterface::handleGeometryChange(w, creationContext->obtainedGeometry); + QWindowSystemInterface::handleGeometryChange<QWindowSystemInterface::SynchronousDelivery>(w, creationContext->obtainedGeometry); } QPlatformScreen *obtainedScreen = screenForGeometry(creationContext->obtainedGeometry); if (obtainedScreen && screen() != obtainedScreen) - QWindowSystemInterface::handleWindowScreenChanged(w, obtainedScreen->screen()); + QWindowSystemInterface::handleWindowScreenChanged<QWindowSystemInterface::SynchronousDelivery>(w, obtainedScreen->screen()); } } |