From 96cebb46c2e9b74ea119b8ed13896f012bea496e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Wed, 4 Nov 2015 15:19:13 +0100 Subject: OS X: Don't forward key events to popup window if it's a tooltip MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 676edc006e9f43 introduced a regression by not filtering the active popup window for tooltips, which is what the corresponding mouse handler in QNSView does. Change-Id: I5091dba0dd43be2e859ea360dfd812c0f081fd32 Reviewed-by: Eike Ziller Reviewed-by: Jake Petroules Reviewed-by: Richard Moe Gustavsen Reviewed-by: Tor Arne Vestbø --- src/plugins/platforms/cocoa/qnsview.mm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/plugins/platforms') diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm index aac50e7833..f414193bdb 100644 --- a/src/plugins/platforms/cocoa/qnsview.mm +++ b/src/plugins/platforms/cocoa/qnsview.mm @@ -1465,8 +1465,10 @@ static QTabletEvent::TabletDevice wacomTabletDevice(NSEvent *theEvent) // Popups implicitly grab key events; forward to the active popup if there is one. // This allows popups to e.g. intercept shortcuts and close the popup in response. - if (QCocoaWindow *popup = QCocoaIntegration::instance()->activePopupWindow()) - window = popup->window(); + if (QCocoaWindow *popup = QCocoaIntegration::instance()->activePopupWindow()) { + if (!popup->m_windowFlags.testFlag(Qt::ToolTip)) + window = popup->window(); + } if (eventType == QEvent::KeyPress) { -- cgit v1.2.3