diff options
author | Morten Johan Sørvig <morten.sorvig@digia.com> | 2014-03-25 14:56:09 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-04-03 11:07:07 +0200 |
commit | acebf6771236a31889c1e888f3ffc5aee1ab9124 (patch) | |
tree | 157881662198d4aabb631b2ccb480b8801e2e9eb /src | |
parent | 66178447e91f56eaeaee203171b9355399d3bb5c (diff) |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoawindow.mm | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm index b27e1b03db..df15b008ab 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.mm +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm @@ -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]; |