From d4753fee99405e64737b7bd0608322019cfd32af Mon Sep 17 00:00:00 2001 From: "pierre%netscape.com" Date: Tue, 22 Sep 1998 04:22:57 +0000 Subject: [PATCH] handle Quit cmd (added mMacPump in order to call StopRunnning) git-svn-id: svn://10.0.0.236/trunk@10684 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/widget/src/mac/nsAppShell.cpp | 12 +++++++----- mozilla/widget/src/mac/nsAppShell.h | 3 ++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/mozilla/widget/src/mac/nsAppShell.cpp b/mozilla/widget/src/mac/nsAppShell.cpp index 0d1f1cd92ed..67655b12a9d 100644 --- a/mozilla/widget/src/mac/nsAppShell.cpp +++ b/mozilla/widget/src/mac/nsAppShell.cpp @@ -55,12 +55,11 @@ void nsAppShell::Create(int* argc, char ** argv) //------------------------------------------------------------------------- nsresult nsAppShell::Run() { -nsMacMessagePump *macpump; + mMacPump = new nsMacMessagePump(mToolKit); + mMacPump->DoMessagePump(); + delete mMacPump; + mMacPump = nsnull; - - macpump = new nsMacMessagePump(mToolKit); - - macpump->DoMessagePump(); //if (mDispatchListener) //mDispatchListener->AfterDispatch(); @@ -75,6 +74,8 @@ nsMacMessagePump *macpump; //------------------------------------------------------------------------- void nsAppShell::Exit() { + if (mMacPump) + mMacPump->StopRunning(); } //------------------------------------------------------------------------- @@ -86,6 +87,7 @@ nsAppShell::nsAppShell() { mRefCnt = 0; mDispatchListener = 0; + mMacPump = nsnull; } //------------------------------------------------------------------------- diff --git a/mozilla/widget/src/mac/nsAppShell.h b/mozilla/widget/src/mac/nsAppShell.h index 1a7d424df08..b7cabb0d926 100644 --- a/mozilla/widget/src/mac/nsAppShell.h +++ b/mozilla/widget/src/mac/nsAppShell.h @@ -38,7 +38,8 @@ class nsAppShell : public nsIAppShell { private: nsDispatchListener *mDispatchListener; - nsToolkit *mToolKit; + nsToolkit *mToolKit; + nsMacMessagePump *mMacPump; // CLASS METHODS private: