Commit 03553453 authored by Maurice Kalinowski's avatar Maurice Kalinowski
Browse files

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: default avatarAndrew Knight <andrew.knight@intopalo.com>
Reviewed-by: default avatarOliver Wolff <oliver.wolff@theqtcompany.com>
Showing with 2 additions and 0 deletions
......@@ -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)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment