From b1452011282bfd0213b9f35b446e4970cb60d112 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 26 Apr 2018 10:34:58 +0200 Subject: 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 Reviewed-by: Oliver Wolff --- src/plugins/platforms/windows/qwindowswindow.cpp | 4 ++-- 1 file 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(w, creationContext->obtainedGeometry); } QPlatformScreen *obtainedScreen = screenForGeometry(creationContext->obtainedGeometry); if (obtainedScreen && screen() != obtainedScreen) - QWindowSystemInterface::handleWindowScreenChanged(w, obtainedScreen->screen()); + QWindowSystemInterface::handleWindowScreenChanged(w, obtainedScreen->screen()); } } -- cgit v1.2.3