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>bb10
parent
1b0fe8b953
commit
f5a56981cd
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue