Don't flush user input events from setVisible

Applications do not expect user input event delivery
during QCocoaWindow::setVisible.

The call to flushWindowSystemEvents still needs
to be here for proper expose event processing, but
we can at least exclude user input events.

Task-number: QTBUG-39842
Change-Id: Ibd511efef47eeda21831481ef096a82d7b5a9cf8
Reviewed-by: Jonathan Liu <net147@gmail.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
bb10
Morten Johan Sørvig 2014-06-26 15:21:26 +02:00
parent b79ba9eade
commit 4d7e587a78
1 changed files with 1 additions and 1 deletions

View File

@ -699,7 +699,7 @@ void QCocoaWindow::setVisible(bool visible)
exposeWindow();
if (m_nsWindow) {
QWindowSystemInterface::flushWindowSystemEvents();
QWindowSystemInterface::flushWindowSystemEvents(QEventLoop::ExcludeUserInputEvents);
// setWindowState might have been called while the window was hidden and
// will not change the NSWindow state in that case. Sync up here: