diff options
author | Alexander Soplyakov <alexander.soplyakov@gmail.com> | 2015-08-26 13:58:10 +0300 |
---|---|---|
committer | Morten Johan Sørvig <morten.sorvig@theqtcompany.com> | 2015-09-02 07:20:34 +0000 |
commit | 6f9e845d9b02ed2becaab4af837535173dad2068 (patch) | |
tree | 96a9b88d03579651a5129d55f5a5cac4a0d37530 | |
parent | b39c9011db62f154d255edeba9242463ad58e570 (diff) |
Make tooltips transparent for mouse events.
This behavior is important because controls (widgets)
under tooltips don't receive mouse events and don't
update their state if it is really needed.
[ChangeLog][QtWidgets][Important behavior changes]
Tooltips on OS X are now transparent for mouse events.
Change-Id: I06403db7b66c87fe53debb033f8a74aa1c93e26a
Task-number: QTBUG-46379
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
-rw-r--r-- | src/plugins/platforms/cocoa/qnsview.mm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm index f27335d752..1ec33df744 100644 --- a/src/plugins/platforms/cocoa/qnsview.mm +++ b/src/plugins/platforms/cocoa/qnsview.mm @@ -704,8 +704,12 @@ QT_WARNING_POP // Popups implicitly grap mouse events; forward to the active popup if there is one if (QCocoaWindow *popup = QCocoaIntegration::instance()->activePopupWindow()) { - if (QNSView *popupView = popup->qtView()) - targetView = popupView; + // Tooltips must be transparent for mouse events + // The bug reference is QTBUG-46379 + if (!popup->m_windowFlags.testFlag(Qt::ToolTip)) { + if (QNSView *popupView = popup->qtView()) + targetView = popupView; + } } [targetView convertFromScreen:[self screenMousePoint:theEvent] toWindowPoint:&qtWindowPoint andScreenPoint:&qtScreenPoint]; |