Clear m_activePopupWindow on popup close.
QCocoaWindow keeps track of popup windows in order to close them when appropriate, for example on mouse clicks outside the popup. In this case the mouse click will be used to close the popup, and will not be send to the QCocoaWindow. Clear m_activePopupWindow when the popup is closed to fix a bug where the first mouse click after closing a popup would have no effect. Change-Id: I7a3e850e4fbf4686540d5d89dac6d7b613ed10a4 Reviewed-by: Eike Ziller <eike.ziller@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
This commit is contained in:
parent
4b755ffa6d
commit
6afb057962
@ -400,15 +400,17 @@ void QCocoaWindow::setVisible(bool visible)
|
||||
} else {
|
||||
[m_contentView setHidden:YES];
|
||||
}
|
||||
if (parentCocoaWindow && window()->type() == Qt::Popup
|
||||
&& m_resizableTransientParent
|
||||
if (parentCocoaWindow && window()->type() == Qt::Popup) {
|
||||
parentCocoaWindow->m_activePopupWindow = 0;
|
||||
if (m_resizableTransientParent
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
|
||||
&& QSysInfo::QSysInfo::MacintoshVersion >= QSysInfo::MV_10_7
|
||||
&& !([parentCocoaWindow->m_nsWindow styleMask] & NSFullScreenWindowMask)
|
||||
&& QSysInfo::QSysInfo::MacintoshVersion >= QSysInfo::MV_10_7
|
||||
&& !([parentCocoaWindow->m_nsWindow styleMask] & NSFullScreenWindowMask)
|
||||
#endif
|
||||
)
|
||||
// QTBUG-30266: a window should not be resizable while a transient popup is open
|
||||
[parentCocoaWindow->m_nsWindow setStyleMask:[parentCocoaWindow->m_nsWindow styleMask] | NSResizableWindowMask];
|
||||
)
|
||||
// QTBUG-30266: a window should not be resizable while a transient popup is open
|
||||
[parentCocoaWindow->m_nsWindow setStyleMask:[parentCocoaWindow->m_nsWindow styleMask] | NSResizableWindowMask];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user