From ed4833465b53dbd691298f8d303df51a8908edba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Wed, 10 Jan 2018 14:38:20 +0100 Subject: [PATCH] Cocoa: Deliver window activation events synchronously MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This prevents delivering queued activation events to windows that have been hidden or destroyed. Task-number: QTBUG-66536 Change-Id: I4edf86b6c8592751130f836876725c786452933c Reviewed-by: Tor Arne Vestbø --- src/plugins/platforms/cocoa/qcocoawindow.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm index c17b384b66..f28d6477f1 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.mm +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm @@ -950,7 +950,7 @@ void QCocoaWindow::windowDidBecomeKey() } if (!windowIsPopupType() && !qnsview_cast(m_view).isMenuView) - QWindowSystemInterface::handleWindowActivated(window()); + QWindowSystemInterface::handleWindowActivated(window()); } void QCocoaWindow::windowDidResignKey() @@ -968,7 +968,7 @@ void QCocoaWindow::windowDidResignKey() if (!keyWindow || keyWindow == m_view.window) { // No new key window, go ahead and set the active window to zero if (!windowIsPopupType() && !qnsview_cast(m_view).isMenuView) - QWindowSystemInterface::handleWindowActivated(0); + QWindowSystemInterface::handleWindowActivated(0); } }