when the widget is being destroyed, check if it is the rollup widget and clear that out before it's too late.

r=saari/sr=hyatt/a=blizzard
bug# 51603
This commit is contained in:
mkaply%us.ibm.com 2001-05-29 23:05:27 +00:00
parent 01e4b9bb6f
commit 009fd9a870

View File

@ -971,6 +971,14 @@ NS_METHOD nsWindow::Destroy()
if( mWindowState == nsWindowState_eLive && mParent)
nsBaseWidget::Destroy();
// 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) {
if (gRollupListener)
gRollupListener->Rollup();
CaptureRollupEvents(nsnull, PR_FALSE, PR_TRUE);
}
if( mWnd)
{
gHwndBeingDestroyed = (mHackDestroyWnd ? mHackDestroyWnd : mWnd);