diff options
author | Gabriel de Dietrich <gabriel.dedietrich@digia.com> | 2013-02-06 16:29:58 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-02-08 15:24:13 +0100 |
commit | 2be39c68320ab058ac5428ed1a9f0bb69a6c5893 (patch) | |
tree | 9c623ed55103cfb43d7f536ebbd21d9ccbfd35c7 /src/plugins/platforms | |
parent | e7a242b27b961c64613542c75c69954d1c7bd315 (diff) |
Cocoa: Make tool window receive mouse events also when its parent is modal
We need to check for the Cocoa window class because of the way
currently QDockWidget works.
Change-Id: If69c7327c168518614fe884defa79deb358e260d
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoawindow.mm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm index 463c065c9a..14d62c9fca 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.mm +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm @@ -301,9 +301,11 @@ void QCocoaWindow::setVisible(bool visible) [m_nsWindow orderFront: nil]; } - // We want the events to properly reach the popup and dialog - if (window()->type() == Qt::Popup || window()->type() == Qt::Dialog) + // We want the events to properly reach the popup, dialog, and tool + if ((window()->type() == Qt::Popup || window()->type() == Qt::Dialog || window()->type() == Qt::Tool) + && [m_nsWindow isKindOfClass:[NSPanel class]]) { [(NSPanel *)m_nsWindow setWorksWhenModal:YES]; + } } } else { [m_contentView setHidden:NO]; |