summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@digia.com>2014-04-11 15:11:09 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-04-12 06:37:16 +0200
commit0be1c4899c15221bf265713e714f5301bfa909d5 (patch)
treea796f85056e23709fb455ec82ca604c5f9773171 /src/plugins
parent9216bfbcb18c61429b6cdbe7ecf2e9e16c9cdaf7 (diff)
Cocoa: Don't consume events when closing tool tips
With change acebf677 we treat Qt::ToolTip similar to Qt::Popup and close them on a mouse click on the parent window. This mouse click is not forwarded to the standard mouse event handler. Add an exception for Qt::ToolTip. Task-number: QTBUG-38267 Change-Id: Ie3121f651a6ccc2427040e61db4f63967467604d Reviewed-by: Eike Ziller <eike.ziller@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/platforms/cocoa/qnsview.mm6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm
index 0b9683a3ef..93462e7ea1 100644
--- a/src/plugins/platforms/cocoa/qnsview.mm
+++ b/src/plugins/platforms/cocoa/qnsview.mm
@@ -639,8 +639,12 @@ static QTouchDevice *touchDevice = 0;
if (m_platformWindow->m_activePopupWindow) {
QWindowSystemInterface::handleCloseEvent(m_platformWindow->m_activePopupWindow);
QWindowSystemInterface::flushWindowSystemEvents();
+ Qt::WindowType type = m_platformWindow->m_activePopupWindow->type();
m_platformWindow->m_activePopupWindow = 0;
- return;
+ // Consume the mouse event when closing the popup, except for tool tips
+ // were it's expected that the event is processed normally.
+ if (type != Qt::ToolTip)
+ return;
}
if ([self hasMarkedText]) {
NSInputManager* inputManager = [NSInputManager currentInputManager];