diff options
author | Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com> | 2015-11-04 15:19:13 +0100 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com> | 2015-11-16 14:26:44 +0000 |
commit | 96cebb46c2e9b74ea119b8ed13896f012bea496e (patch) | |
tree | 2200ece6147df537e32ae46d36818afef6cc1478 /src/plugins/platforms/cocoa | |
parent | 2f9effeb64e00325c6d0978c48f2c820021bb414 (diff) |
OS X: Don't forward key events to popup window if it's a tooltip
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 <eike.ziller@theqtcompany.com>
Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/cocoa')
-rw-r--r-- | src/plugins/platforms/cocoa/qnsview.mm | 6 |
1 files changed, 4 insertions, 2 deletions
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) { |