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>
This commit is contained in:
parent
e7a242b27b
commit
2be39c6832
@ -301,10 +301,12 @@ void QCocoaWindow::setVisible(bool visible)
|
|||||||
[m_nsWindow orderFront: nil];
|
[m_nsWindow orderFront: nil];
|
||||||
}
|
}
|
||||||
|
|
||||||
// We want the events to properly reach the popup and dialog
|
// We want the events to properly reach the popup, dialog, and tool
|
||||||
if (window()->type() == Qt::Popup || window()->type() == Qt::Dialog)
|
if ((window()->type() == Qt::Popup || window()->type() == Qt::Dialog || window()->type() == Qt::Tool)
|
||||||
|
&& [m_nsWindow isKindOfClass:[NSPanel class]]) {
|
||||||
[(NSPanel *)m_nsWindow setWorksWhenModal:YES];
|
[(NSPanel *)m_nsWindow setWorksWhenModal:YES];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
[m_contentView setHidden:NO];
|
[m_contentView setHidden:NO];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user