Enlightenment CVS committal Author : englebass Project : e17 Module : apps/e
Dir : e17/apps/e/src/bin Modified Files: e.h e_border.c e_dnd.c e_fwin.c e_ipc.c e_ipc.h e_main.c e_utils.c Log Message: - Add flag to indicate when main loop has ended. - Don't allow (some) events during shutdown, as events wont be processed. - Don't remove drop handlers on dnd shutdown, they should be removed by their creators. - init/shutdown fwin - Delete fwins on shutdown. - Remove weird ipc wrapper function. - Don't do additional shutdown functions on restart. =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e.h,v retrieving revision 1.60 retrieving revision 1.61 diff -u -3 -r1.60 -r1.61 --- e.h 25 Mar 2007 22:44:59 -0000 1.60 +++ e.h 5 Apr 2007 06:59:02 -0000 1.61 @@ -157,5 +157,6 @@ extern EAPI int good; extern EAPI int evil; extern EAPI int starting; +extern EAPI int stopping; #endif =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_border.c,v retrieving revision 1.580 retrieving revision 1.581 diff -u -3 -r1.580 -r1.581 --- e_border.c 3 Apr 2007 19:08:27 -0000 1.580 +++ e_border.c 5 Apr 2007 06:59:02 -0000 1.581 @@ -745,6 +745,7 @@ if (!manage) ecore_x_window_prop_card32_set(bd->client.win, E_ATOM_MANAGED, &visible, 1); + if (!stopping) { E_Event_Border_Hide *ev; @@ -3238,12 +3239,10 @@ } bd->already_unparented = 1; - if (!bd->new_client) + if ((!bd->new_client) && (!stopping)) { ev = calloc(1, sizeof(E_Event_Border_Remove)); ev->border = bd; - /* FIXME Don't ref this during shutdown. And the event is pointless - * during shutdown.. */ e_object_ref(E_OBJECT(bd)); // e_object_breadcrumb_add(E_OBJECT(bd), "border_remove_event"); ecore_event_add(E_EVENT_BORDER_REMOVE, ev, _e_border_event_border_remove_free, NULL); =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_dnd.c,v retrieving revision 1.57 retrieving revision 1.58 diff -u -3 -r1.57 -r1.58 --- e_dnd.c 7 Jan 2007 16:32:57 -0000 1.57 +++ e_dnd.c 5 Apr 2007 06:59:02 -0000 1.58 @@ -124,13 +124,6 @@ _event_handlers = NULL; evas_hash_free(_drop_win_hash); - for (l = _drop_handlers; l; l = l->next) - { - E_Drop_Handler *h; - - h = l->data; - e_drop_handler_del(h); - } evas_list_free(_drop_handlers); _drop_handlers = NULL; =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_fwin.c,v retrieving revision 1.32 retrieving revision 1.33 diff -u -3 -r1.32 -r1.33 --- e_fwin.c 25 Mar 2007 18:20:07 -0000 1.32 +++ e_fwin.c 5 Apr 2007 06:59:02 -0000 1.33 @@ -56,6 +56,14 @@ EAPI int e_fwin_shutdown(void) { + Evas_List *l, *tmp; + + for (l = fwins; l;) + { + tmp = l; + l = l->next; + e_object_del(E_OBJECT(tmp->data)); + } return 1; } =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_ipc.c,v retrieving revision 1.57 retrieving revision 1.58 diff -u -3 -r1.57 -r1.58 --- e_ipc.c 2 Mar 2007 17:00:20 -0000 1.57 +++ e_ipc.c 5 Apr 2007 06:59:02 -0000 1.58 @@ -83,7 +83,7 @@ return 1; } -EAPI void +EAPI int e_ipc_shutdown(void) { #ifdef USE_IPC @@ -93,7 +93,8 @@ ecore_ipc_server_del(_e_ipc_server); _e_ipc_server = NULL; } -#endif +#endif + return 1; } #ifdef USE_IPC =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_ipc.h,v retrieving revision 1.22 retrieving revision 1.23 diff -u -3 -r1.22 -r1.23 --- e_ipc.h 2 Mar 2007 17:00:20 -0000 1.22 +++ e_ipc.h 5 Apr 2007 06:59:02 -0000 1.23 @@ -25,8 +25,8 @@ #ifndef E_IPC_H #define E_IPC_H -EAPI int e_ipc_init(void); -EAPI void e_ipc_shutdown(void); +EAPI int e_ipc_init(void); +EAPI int e_ipc_shutdown(void); #endif #endif =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_main.c,v retrieving revision 1.217 retrieving revision 1.218 diff -u -3 -r1.217 -r1.218 --- e_main.c 4 Apr 2007 22:52:21 -0000 1.217 +++ e_main.c 5 Apr 2007 06:59:02 -0000 1.218 @@ -16,8 +16,6 @@ static int _e_main_screens_shutdown(void); static int _e_main_path_init(void); static int _e_main_path_shutdown(void); -static int _e_main_ipc_init(void); -static int _e_main_ipc_shutdown(void); static void _e_main_cb_x_fatal(void *data); static int _e_main_cb_signal_exit(void *data, int ev_type, void *ev); @@ -514,8 +512,7 @@ evas_object_del(im); ecore_evas_free(ee); } -// segv's on restart if fm open. -// _e_main_shutdown_push(ecore_evas_shutdown); + _e_main_shutdown_push(ecore_evas_shutdown); TS("test done"); TS("thumb init"); @@ -679,8 +676,8 @@ TS("ipc"); /* setup e ipc service */ - if (_e_main_ipc_init()) - _e_main_shutdown_push(_e_main_ipc_shutdown); + if (e_ipc_init()) + _e_main_shutdown_push(e_ipc_shutdown); TS("fm2"); /* init the enlightenment file manager */ @@ -690,6 +687,13 @@ _e_main_shutdown(-1); } _e_main_shutdown_push(e_fm2_shutdown); + TS("fwin"); + if (!e_fwin_init()) + { + e_error_message_show(_("Enlightenment cannot initialize the File manager.\n")); + _e_main_shutdown(-1); + } + _e_main_shutdown_push(e_fwin_shutdown); TS("msg"); /* setup generic msg handling etc */ if (!e_msg_init()) @@ -869,6 +873,7 @@ starting = 0; /* start our main loop */ ecore_main_loop_begin(); + stopping = 1; /* ask all modules to save their config and then shutdown */ /* NB: no need to do this as config shutdown will flush any saves */ @@ -885,8 +890,8 @@ if (restart) { /* selected shutdown */ - e_ipc_shutdown(); #if 0 + e_ipc_shutdown(); ecore_file_shutdown(); #endif e_util_env_set("E_RESTART_OK", "1"); @@ -1314,20 +1319,6 @@ e_object_del(E_OBJECT(path_messages)); path_messages = NULL; } - return 1; -} - -static int -_e_main_ipc_init(void) -{ - if (!e_ipc_init()) return 0; - return 1; -} - -static int -_e_main_ipc_shutdown(void) -{ - e_ipc_shutdown(); return 1; } =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_utils.c,v retrieving revision 1.65 retrieving revision 1.66 diff -u -3 -r1.65 -r1.66 --- e_utils.c 3 Apr 2007 18:46:54 -0000 1.65 +++ e_utils.c 5 Apr 2007 06:59:02 -0000 1.66 @@ -16,6 +16,7 @@ EAPI int good = 0; EAPI int evil = 0; EAPI int starting = 1; +EAPI int stopping = 0; typedef struct _E_Util_Fake_Mouse_Up_Info E_Util_Fake_Mouse_Up_Info; ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs