From 6f9e845d9b02ed2becaab4af837535173dad2068 Mon Sep 17 00:00:00 2001 From: Alexander Soplyakov Date: Wed, 26 Aug 2015 13:58:10 +0300 Subject: [PATCH] Make tooltips transparent for mouse events. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/plugins/platforms/cocoa/qnsview.mm | 8 ++++++-- 1 file 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];