зеркало из https://github.com/mozilla/gecko-dev.git
implement nsAppShell::Exit()
This commit is contained in:
Родитель
3b08048ac8
Коммит
8c845b3fb5
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче