From 4d7e587a78799a390968615cdfe02a30f566a337 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Thu, 26 Jun 2014 15:21:26 +0200 Subject: Don't flush user input events from setVisible MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Morten Johan Sørvig --- src/plugins/platforms/cocoa/qcocoawindow.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm index 9259c2c772..b680c01c09 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.mm +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm @@ -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: -- cgit v1.2.3