From 640ceb8e7bc58a30caa8f44d74886e7a21c1e8a4 Mon Sep 17 00:00:00 2001 From: "mkaply%us.ibm.com" Date: Tue, 28 Aug 2001 13:18:24 +0000 Subject: [PATCH] #97166 r=mkaply, sr=blizzard, a=asa for drivers OS/2 only - Code from aaronr - workaround crash using XCenter/XWorkplace --- widget/src/os2/nsFrameWindow.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/widget/src/os2/nsFrameWindow.cpp b/widget/src/os2/nsFrameWindow.cpp index ff9cf1cff44f..e711d11e7deb 100644 --- a/widget/src/os2/nsFrameWindow.cpp +++ b/widget/src/os2/nsFrameWindow.cpp @@ -44,6 +44,7 @@ extern nsIWidget * gRollupWidget; extern PRBool gRollupConsumeRollupEvent; extern PRBool gJustGotDeactivate; +extern HWND gHwndBeingDestroyed; nsFrameWindow::nsFrameWindow() : nsCanvas() @@ -393,7 +394,18 @@ MRESULT nsFrameWindow::FrameMessage( ULONG msg, MPARAM mp1, MPARAM mp2) case WM_ACTIVATE: if( !mp1) - gJustGotDeactivate = PR_TRUE; + { + /* we don't want to go through all of this deactivation stuff if + * the window is just going away anyhow. Causes problems to process + * the deactivation event if we've hit some destructors or done + * some destroy work. Especially w.r.t the focus controller + */ + if( (hwndFrame != gHwndBeingDestroyed) || + (!WinIsChild( hwndFrame, gHwndBeingDestroyed )) ) + { + gJustGotDeactivate = PR_TRUE; + } + } break; }