From b48fcb24532821154a4e03cc91d98e02696c50e6 Mon Sep 17 00:00:00 2001 From: "spider%netscape.com" Date: Mon, 26 Oct 1998 19:34:51 +0000 Subject: [PATCH] Fix for shutting down when initiated by menu bar git-svn-id: svn://10.0.0.236/trunk@13465 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/xpfc/shell/src/nsShellInstance.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mozilla/xpfc/shell/src/nsShellInstance.cpp b/mozilla/xpfc/shell/src/nsShellInstance.cpp index 4ac691ef2d9..43f3b9faff2 100644 --- a/mozilla/xpfc/shell/src/nsShellInstance.cpp +++ b/mozilla/xpfc/shell/src/nsShellInstance.cpp @@ -420,7 +420,7 @@ nsresult nsShellInstance::ExitApplication() { #ifdef NS_WIN32 - PostQuitMessage(0); + ::PostMessage((HWND)GetApplicationWindowNativeInstance(),WM_CLOSE,0,0L); #endif return NS_OK; } @@ -525,6 +525,9 @@ nsEventStatus PR_CALLBACK HandleEventApplication(nsGUIEvent *aEvent) } + } else if ((aEvent->message == NS_DESTROY) && (gShellInstance->GetApplicationWidget() == aEvent->widget)) + { + ::PostQuitMessage(0); } return (gShellInstance->GetApplicationShell()->HandleEvent(aEvent));