winrt: Flush the system event queue when adding/removing windows

This has only been identified by WACK for Windows 10.

QWinRTWindow::setVisible adds a Window to the screen and immediately
tries to set the native visibility. This only works when the system
events are handled immediately. While this is the case most of the time,
certification tests revealed that this is not always the case. We have
to flush before setting the element visibility.

Change-Id: Ifce4c045c185c57bc386a4e832074fb84f5d0053
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
This commit is contained in:
Maurice Kalinowski 2016-01-08 18:08:36 +01:00
parent 14e43c8f42
commit 0355345398

View File

@ -779,6 +779,7 @@ void QWinRTScreen::addWindow(QWindow *window)
d->visibleWindows.prepend(window);
QWindowSystemInterface::handleWindowActivated(window, Qt::OtherFocusReason);
handleExpose();
QWindowSystemInterface::flushWindowSystemEvents();
}
void QWinRTScreen::removeWindow(QWindow *window)
@ -796,6 +797,7 @@ void QWinRTScreen::removeWindow(QWindow *window)
if (wasTopWindow)
QWindowSystemInterface::handleWindowActivated(window, Qt::OtherFocusReason);
handleExpose();
QWindowSystemInterface::flushWindowSystemEvents();
}
void QWinRTScreen::raise(QWindow *window)