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>
This commit is contained in:
Alexander Soplyakov 2015-08-26 13:58:10 +03:00 committed by Morten Johan Sørvig
parent b39c9011db
commit 6f9e845d9b

View File

@ -704,9 +704,13 @@ QT_WARNING_POP
// Popups implicitly grap mouse events; forward to the active popup if there is one
if (QCocoaWindow *popup = QCocoaIntegration::instance()->activePopupWindow()) {
// 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];
ulong timestamp = [theEvent timestamp] * 1000;