From f5a56981cd9eb56f8ba533a31e9b9dfd302148cf Mon Sep 17 00:00:00 2001 From: Oliver Wolff Date: Mon, 7 May 2018 15:26:36 +0200 Subject: winrt: Handle expose event before removing window QWindow should get an expose event before being hidden. handleExpose iterates over the list of visible windows, so it has to be called before the window is removed from the list of visible windows. Change-Id: Ide920ade43c057b9aafdf9fdfa2d54d3336289d8 Reviewed-by: Andre de la Rocha Reviewed-by: Maurice Kalinowski --- src/plugins/platforms/winrt/qwinrtscreen.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/plugins/platforms/winrt/qwinrtscreen.cpp') diff --git a/src/plugins/platforms/winrt/qwinrtscreen.cpp b/src/plugins/platforms/winrt/qwinrtscreen.cpp index a325d6f817..a60d50bcc1 100644 --- a/src/plugins/platforms/winrt/qwinrtscreen.cpp +++ b/src/plugins/platforms/winrt/qwinrtscreen.cpp @@ -862,6 +862,8 @@ void QWinRTScreen::removeWindow(QWindow *window) Q_D(QWinRTScreen); qCDebug(lcQpaWindows) << __FUNCTION__ << window; + handleExpose(); + const bool wasTopWindow = window == topWindow(); if (!d->visibleWindows.removeAll(window)) return; @@ -869,7 +871,6 @@ void QWinRTScreen::removeWindow(QWindow *window) const Qt::WindowType type = window->type(); if (wasTopWindow && type != Qt::Popup && type != Qt::ToolTip && type != Qt::Tool) QWindowSystemInterface::handleWindowActivated(nullptr, Qt::OtherFocusReason); - handleExpose(); QWindowSystemInterface::flushWindowSystemEvents(QEventLoop::ExcludeUserInputEvents); #ifndef QT_NO_DRAGANDDROP if (wasTopWindow) -- cgit v1.2.3