diff options
author | Oliver Wolff <oliver.wolff@qt.io> | 2018-05-07 15:26:36 +0200 |
---|---|---|
committer | Oliver Wolff <oliver.wolff@qt.io> | 2018-05-25 11:02:18 +0000 |
commit | f5a56981cd9eb56f8ba533a31e9b9dfd302148cf (patch) | |
tree | 5fcea61237dfec2d8eb251f89478c23d667152d8 /src/plugins/platforms/winrt/qwinrtscreen.cpp | |
parent | 1b0fe8b9539f70ea8e214a3bf24b75be5ffbb9b0 (diff) |
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 <andre.rocha@qt.io>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Diffstat (limited to 'src/plugins/platforms/winrt/qwinrtscreen.cpp')
-rw-r--r-- | src/plugins/platforms/winrt/qwinrtscreen.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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) |