Bug 891424. Hide cocoa window's when they are destroyed, otherwise they can stay on screen, and remove a different fix for the same bug that caused a regression. r=smichaud

We also remove a different fix for this same bug that caused some regressions: calling RemoveChild so that the nsCocoaWindow actually dies.
This commit is contained in:
Timothy Nikkel 2013-07-19 15:57:59 -05:00
Родитель ca191d149e
Коммит 6a5f13253e
1 изменённых файлов: 6 добавлений и 5 удалений

Просмотреть файл

@ -512,15 +512,16 @@ NS_IMETHODIMP nsCocoaWindow::CreatePopupContentView(const nsIntRect &aRect,
NS_IMETHODIMP nsCocoaWindow::Destroy()
{
// The reference from a possible sibling widget will never get cleared because
// we don't implement GetParent so RemoveChild never removes us from the
// sibling widget list. So if we don't hide ourselves here we may stay on
// screen. This is gross. (Bug 891424)
Show(false);
if (mPopupContentView)
mPopupContentView->Destroy();
nsBaseWidget::Destroy();
// nsBaseWidget::Destroy() calls GetParent()->RemoveChild(this). But we
// don't implement GetParent(), so we need to do the equivalent here.
if (mParent) {
mParent->RemoveChild(this);
}
nsBaseWidget::OnDestroy();
if (mFullScreen) {