Enlightenment CVS committal
Author : kwo
Project : e16
Module : e
Dir : e16/e/src
Modified Files:
E.h events.c handlers.c main.c session.c session.h
Log Message:
Normally quit by exiting main event loop.
===================================================================
RCS file: /cvs/e/e16/e/src/E.h,v
retrieving revision 1.553
retrieving revision 1.554
diff -u -3 -r1.553 -r1.554
--- E.h 30 Apr 2006 13:23:01 -0000 1.553
+++ E.h 12 May 2006 13:10:16 -0000 1.554
@@ -496,6 +496,8 @@
char exiting;
char save_ok;
char coredump;
+ int exit_mode;
+ char *exit_param;
int child_count;
pid_t *children;
char *machine_name;
===================================================================
RCS file: /cvs/e/e16/e/src/events.c,v
retrieving revision 1.122
retrieving revision 1.123
diff -u -3 -r1.122 -r1.123
--- events.c 10 May 2006 19:37:47 -0000 1.122
+++ events.c 12 May 2006 13:10:16 -0000 1.123
@@ -629,7 +629,7 @@
time1 = GetTime();
- for (;;)
+ for (; !Mode.wm.exit_mode;)
{
pfetch = 0;
count = EventsProcess(&evq_ptr, &evq_alloc, &pfetch);
===================================================================
RCS file: /cvs/e/e16/e/src/handlers.c,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -3 -r1.53 -r1.54
--- handlers.c 19 Apr 2006 19:13:46 -0000 1.53
+++ handlers.c 12 May 2006 13:10:16 -0000 1.54
@@ -48,7 +48,7 @@
case SIGQUIT:
case SIGABRT:
case SIGTERM:
- SessionExit(EEXIT_ERROR, NULL);
+ SessionExit(EEXIT_EXIT, NULL);
break;
case SIGPIPE:
===================================================================
RCS file: /cvs/e/e16/e/src/main.c,v
retrieving revision 1.147
retrieving revision 1.148
diff -u -3 -r1.147 -r1.148
--- main.c 29 Apr 2006 19:39:21 -0000 1.147
+++ main.c 12 May 2006 13:10:16 -0000 1.148
@@ -295,9 +295,9 @@
/* The primary event loop */
EventsMain();
- /* Of course, we should NEVER get to this point */
+ SessionExit(EEXIT_QUIT, NULL);
- return 1;
+ return 0;
}
void
@@ -320,8 +320,6 @@
XSelectInput(disp, VRoot.xwin, 0);
EDisplayClose();
}
-
- SignalsRestore();
if (Mode.wm.master)
{
===================================================================
RCS file: /cvs/e/e16/e/src/session.c,v
retrieving revision 1.123
retrieving revision 1.124
diff -u -3 -r1.123 -r1.124
--- session.c 29 Apr 2006 19:39:21 -0000 1.123
+++ session.c 12 May 2006 13:10:16 -0000 1.124
@@ -594,7 +594,7 @@
else
#endif /* HAVE_X11_SM_SMLIB_H */
{
- doSMExit(EEXIT_EXIT, NULL);
+ SessionExit(EEXIT_EXIT, NULL);
}
}
@@ -666,22 +666,44 @@
if (getpid() != Mode.wm.pid)
return;
- if (mode == EEXIT_LOGOUT)
+ if (EventDebug(EDBUG_TYPE_SESSION))
+ Eprintf("SessionExit: mode=%d(%d) prm=%s\n", mode, Mode.wm.exit_mode,
+ param);
+
+ if (Mode.wm.startup)
+ goto done;
+
+ switch (mode)
{
- if (Conf.session.enable_logout_dialog)
- SessionLogoutConfirm();
- else
- SessionLogout();
+ default:
+ /* In event loop - Set exit mode */
+ Mode.wm.exit_mode = mode;
+ Mode.wm.exit_param = Estrdup(param);
return;
- }
- if (Mode.wm.exiting++)
- {
+ case EEXIT_QUIT:
+ mode = Mode.wm.exit_mode;
+ param = Mode.wm.exit_param;
+ break;
+
+ case EEXIT_ERROR:
+ if (!Mode.wm.exiting)
+ break;
/* This may be possible during nested signal handling */
Eprintf("SessionExit already in progress ... now exiting\n");
exit(1);
+ break;
+
+ case EEXIT_LOGOUT:
+ if (Conf.session.enable_logout_dialog)
+ SessionLogoutConfirm();
+ else
+ SessionLogout();
+ return;
}
+ done:
+ Mode.wm.exiting++;
doSMExit(mode, param);
}
===================================================================
RCS file: /cvs/e/e16/e/src/session.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- session.h 19 Apr 2006 19:13:46 -0000 1.1
+++ session.h 12 May 2006 13:10:16 -0000 1.2
@@ -25,12 +25,13 @@
#define _SESSION_H_
/* session.c */
-#define EEXIT_EXIT 0
-#define EEXIT_ERROR 1
-#define EEXIT_LOGOUT 2
-#define EEXIT_RESTART 3
-#define EEXIT_THEME 4
-#define EEXIT_EXEC 5
+#define EEXIT_QUIT 0
+#define EEXIT_EXIT 1
+#define EEXIT_ERROR 2
+#define EEXIT_LOGOUT 3
+#define EEXIT_RESTART 4
+#define EEXIT_THEME 5
+#define EEXIT_EXEC 6
#define ESESSION_INIT 0
#define ESESSION_START 1
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs