From 3d6f2f55f736d304c5102e116e240972dd69f5f7 Mon Sep 17 00:00:00 2001 From: "blizzard%redhat.com" Date: Sun, 1 Aug 1999 03:52:12 +0000 Subject: [PATCH] implement nsAppShell::Exit() git-svn-id: svn://10.0.0.236/trunk@41749 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/widget/src/xlib/nsAppShell.cpp | 4 +++- mozilla/widget/src/xlib/nsAppShell.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/mozilla/widget/src/xlib/nsAppShell.cpp b/mozilla/widget/src/xlib/nsAppShell.cpp index 088d448ce79..df75664c12c 100644 --- a/mozilla/widget/src/xlib/nsAppShell.cpp +++ b/mozilla/widget/src/xlib/nsAppShell.cpp @@ -42,6 +42,7 @@ static NS_DEFINE_IID(kIEventQueueServiceIID, NS_IEVENTQUEUESERVICE_IID); extern "C" int NS_TimeToNextTimeout(struct timeval *); extern "C" void NS_ProcessTimeouts(void); +PRBool nsAppShell::DieAppShellDie = PR_FALSE; // For debugging. static char *event_names[] = { @@ -197,7 +198,7 @@ nsresult nsAppShell::Run() max_fd = queue_fd + 1; } // process events. - while (1) { + while (DieAppShellDie == PR_FALSE) { XEvent event; struct timeval cur_time; struct timeval *cur_time_ptr; @@ -281,6 +282,7 @@ nsresult nsAppShell::DispatchNativeEvent(PRBool aRealEvent, void *aEvent) NS_METHOD nsAppShell::Exit() { + DieAppShellDie = PR_TRUE; return NS_OK; } diff --git a/mozilla/widget/src/xlib/nsAppShell.h b/mozilla/widget/src/xlib/nsAppShell.h index a6466e8634b..e05032a5b37 100644 --- a/mozilla/widget/src/xlib/nsAppShell.h +++ b/mozilla/widget/src/xlib/nsAppShell.h @@ -60,6 +60,7 @@ class nsAppShell : public nsIAppShell static void HandleUnmapNotifyEvent(XEvent *event, nsWidget *aWidget); static void HandleEnterEvent(XEvent *event, nsWidget *aWidget); static void HandleLeaveEvent(XEvent *event, nsWidget *aWidget); + static PRBool DieAppShellDie; protected: nsIEventQueueService * mEventQueueService;