зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
ca191d149e
Коммит
6a5f13253e
|
@ -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) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче