Bug 1320341, don't show a panel when the parent window is miniaturized or hidden, r=mstange

This commit is contained in:
Neil Deakin 2016-12-22 11:06:59 -05:00
parent f451a87ac2
commit 20b2609458

View File

@ -757,6 +757,13 @@ NS_IMETHODIMP nsCocoaWindow::Show(bool bState)
(NSWindow*)parentWidget->GetNativeData(NS_NATIVE_WINDOW) : nil;
if (bState && !mBounds.IsEmpty()) {
// Don't try to show a popup when the parent isn't visible or is minimized.
if (mWindowType == eWindowType_popup && nativeParentWindow) {
if (![nativeParentWindow isVisible] || [nativeParentWindow isMiniaturized]) {
return NS_OK;
}
}
if (mPopupContentView) {
// Ensure our content view is visible. We never need to hide it.
mPopupContentView->Show(true);