Cocoa: Close ToolTips on parent window move.
Treat Qt::ToolTip windows the same way as Qt::Popup windows: The parent window keeps track visible transient child windows of this type and closes them when appropriate. This improves the locator popup window behavior in Qt Creator: It now closes when moving the main Qt Creator window. Change-Id: Ibc5d0713469b7c9aba2fd13fb1eb559706c8c4ed Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
This commit is contained in:
parent
66178447e9
commit
acebf67712
@ -619,11 +619,13 @@ void QCocoaWindow::setVisible(bool visible)
|
||||
// update the window geometry if there is a parent.
|
||||
setGeometry(window()->geometry());
|
||||
|
||||
// Register popup windows so that the parent window can
|
||||
// close them when needed.
|
||||
if (window()->type() == Qt::Popup) {
|
||||
// Register popup windows so that the parent window can close them when needed.
|
||||
if (window()->type() == Qt::Popup || window()->type() == Qt::ToolTip) {
|
||||
// qDebug() << "transientParent and popup" << window()->type() << Qt::Popup << (window()->type() & Qt::Popup);
|
||||
parentCocoaWindow->m_activePopupWindow = window();
|
||||
}
|
||||
|
||||
if (window()->type() == Qt::Popup) {
|
||||
// QTBUG-30266: a window should not be resizable while a transient popup is open
|
||||
// Since this isn't a native popup, the window manager doesn't close the popup when you click outside
|
||||
NSUInteger parentStyleMask = [parentCocoaWindow->m_nsWindow styleMask];
|
||||
|
Loading…
Reference in New Issue
Block a user