Fix for bug 307678 -- Fixing remaining MouseTrailer problems with dialogs.

r+sr=roc
This commit is contained in:
emaijala%kolumbus.fi 2005-10-18 19:44:31 +00:00
Родитель 014614bdd1
Коммит f0d80c29cd
1 изменённых файлов: 7 добавлений и 0 удалений

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

@ -909,6 +909,7 @@ nsWindow::~nsWindow()
if (MouseTrailer::GetSingleton().GetMouseTrailerWindow() == this) {
MouseTrailer::GetSingleton().DestroyTimer();
MouseTrailer::GetSingleton().SetMouseTrailerWindow(nsnull);
}
// If the widget was released without calling Destroy() then the native
@ -1608,6 +1609,12 @@ NS_METHOD nsWindow::Destroy()
nsBaseWidget::Destroy();
}
// get rid of any mouse trailer references to self
if (MouseTrailer::GetSingleton().GetMouseTrailerWindow() == this) {
MouseTrailer::GetSingleton().DestroyTimer();
MouseTrailer::GetSingleton().SetMouseTrailerWindow(nsnull);
}
// just to be safe. If we're going away and for some reason we're still
// the rollup widget, rollup and turn off capture.
if ( this == gRollupWidget ) {