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
This commit is contained in:
pierre%netscape.com 1998-09-22 04:22:57 +00:00
parent 0c9c5041c3
commit d4753fee99
2 changed files with 9 additions and 6 deletions

View File

@ -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;
}
//-------------------------------------------------------------------------

View File

@ -38,7 +38,8 @@ class nsAppShell : public nsIAppShell
{
private:
nsDispatchListener *mDispatchListener;
nsToolkit *mToolKit;
nsToolkit *mToolKit;
nsMacMessagePump *mMacPump;
// CLASS METHODS
private: