summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@digia.com>2013-03-13 15:28:39 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-19 10:44:55 +0100
commit79e729e111dd799ddbe281aaddfbc0e1ec0e7bc0 (patch)
treea4a4d61e62f723cd3b79f768b2337d79eb386e8c
parentf8624b188b648defb82f65772ccc38286d1b8586 (diff)
downloadqtbase-79e729e111dd799ddbe281aaddfbc0e1ec0e7bc0.tar.gz
OSX: obey the Qt::WindowTransparentForInput flag
Ignoring the mouse means you don't get window enter/exit events for that window either. Task-number: QTBUG-30122 Change-Id: I979be9f72f7d225d7b960fc5db4c3956d2749982 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindow.mm2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm
index 500eea6f4b..5eab036661 100644
--- a/src/plugins/platforms/cocoa/qcocoawindow.mm
+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
@@ -418,6 +418,8 @@ void QCocoaWindow::setWindowFlags(Qt::WindowFlags flags)
NSInteger level = this->windowLevel(flags);
[m_nsWindow setStyleMask:styleMask];
[m_nsWindow setLevel:level];
+ [m_nsWindow setIgnoresMouseEvents:((flags & Qt::ToolTip) == Qt::ToolTip) ? YES : NO];
+ // TODO deal with WindowTransparentForInput; setIgnoresMouseEvents is too extreme, you can't click the titlebar
setWindowShadow(flags);
}