Enable continuing startup when there are errors in ...e_session-XXXXXX.
SVN revision: 10551
This commit is contained in:
parent
9c8f848a7f
commit
e380847cec
|
@ -1792,19 +1792,15 @@ doMoveModeSet(EWin * edummy, const void *params)
|
|||
{
|
||||
EDBUG(6, "doMoveModeSet");
|
||||
if (params)
|
||||
{
|
||||
Conf.movemode = atoi((char *)params);
|
||||
}
|
||||
else
|
||||
{
|
||||
Conf.movemode++;
|
||||
if (Conf.movemode > 5)
|
||||
Conf.movemode = 0;
|
||||
}
|
||||
#if !USE_IMLIB2
|
||||
if ((prImlib_Context) && (Conf.movemode == 5))
|
||||
Conf.movemode = 3;
|
||||
#endif
|
||||
if (Conf.movemode < 0 || Conf.movemode > 5)
|
||||
Conf.movemode = 0;
|
||||
autosave();
|
||||
EDBUG_RETURN(0);
|
||||
edummy = NULL;
|
||||
|
@ -1815,17 +1811,11 @@ doResizeModeSet(EWin * edummy, const void *params)
|
|||
{
|
||||
EDBUG(6, "doResizeModeSet");
|
||||
if (params)
|
||||
{
|
||||
Conf.resizemode = atoi((char *)params);
|
||||
}
|
||||
else
|
||||
{
|
||||
Conf.resizemode++;
|
||||
if (Conf.resizemode > 4)
|
||||
if (Conf.resizemode < 0 || Conf.resizemode > 4)
|
||||
Conf.resizemode = 0;
|
||||
}
|
||||
if (Conf.resizemode == 5)
|
||||
Conf.resizemode = 3;
|
||||
autosave();
|
||||
EDBUG_RETURN(0);
|
||||
edummy = NULL;
|
||||
|
|
22
src/config.c
22
src/config.c
|
@ -692,9 +692,13 @@ Config_Control(FILE * ConfigFile)
|
|||
break;
|
||||
case CONTROL_MOVEMODE:
|
||||
Conf.movemode = i2;
|
||||
if (Conf.movemode < 0 || Conf.movemode > 5)
|
||||
Conf.movemode = 0;
|
||||
break;
|
||||
case CONTROL_RESIZEMODE:
|
||||
Conf.resizemode = i2;
|
||||
if (Conf.resizemode < 0 || Conf.resizemode > 4)
|
||||
Conf.resizemode = 0;
|
||||
break;
|
||||
case CONTROL_GEOMINFOMODE:
|
||||
Conf.geominfomode = i2;
|
||||
|
@ -4244,23 +4248,25 @@ SaveUserControlConfig(FILE * autosavefile)
|
|||
static void
|
||||
RecoverUserConfig(void)
|
||||
{
|
||||
int save;
|
||||
|
||||
if (is_autosave)
|
||||
{
|
||||
/* Don't save settings if we restart or quit */
|
||||
save = Conf.autosave;
|
||||
Conf.autosave = 0;
|
||||
|
||||
AlertX(_("Recover system config?"), _("Yes, Attempt recovery"),
|
||||
_("Restart and try again"), _("Quit and give up"),
|
||||
_
|
||||
("Enlightenment has encountered parsing errors in your autosaved\n"
|
||||
"configuration.\n" "\n"
|
||||
"This may be due to filing system errors, Minor bugs or "
|
||||
"unforeseen\n" "system shutdowns.\n" "\n"
|
||||
"Do you wish Enlightenment to recover its original system\n"
|
||||
"configuration and try again?\n"));
|
||||
Conf.autosave = 0;
|
||||
MapUnmap(1);
|
||||
if (Mode.wm.master && init_win_ext)
|
||||
{
|
||||
XKillClient(disp, init_win_ext);
|
||||
init_win_ext = 0;
|
||||
}
|
||||
SessionExit("restart");
|
||||
|
||||
/* Allow settings to be saved if we continue */
|
||||
Conf.autosave = save;
|
||||
}
|
||||
}
|
||||
|
|
13
src/main.c
13
src/main.c
|
@ -232,14 +232,15 @@ main(int argc, char **argv)
|
|||
GotoDesktop(0);
|
||||
CommsSetup();
|
||||
CommsFindCommsWindow();
|
||||
GrabX();
|
||||
LoadGroups();
|
||||
LoadSnapInfo();
|
||||
|
||||
GrabX();
|
||||
MapUnmap(0);
|
||||
UngrabX();
|
||||
|
||||
/* make all of our fallback classes */
|
||||
SetupFallbackClasses();
|
||||
UngrabX();
|
||||
|
||||
desks.desk[0].viewable = 0;
|
||||
/* now we're going to load the configuration/theme */
|
||||
|
@ -296,10 +297,6 @@ main(int argc, char **argv)
|
|||
XSync(disp, False);
|
||||
Mode.queue_up = DRAW_QUEUE_ENABLE;
|
||||
|
||||
/* hello! we don't have a resizemode of 5! */
|
||||
if (Conf.resizemode == 5)
|
||||
Conf.resizemode = 0;
|
||||
|
||||
/* of course, we have to set the cursors */
|
||||
ec = FindItem("DEFAULT", 0, LIST_FINDBY_NAME, LIST_TYPE_ECURSOR);
|
||||
if (ec)
|
||||
|
@ -371,6 +368,10 @@ main(int argc, char **argv)
|
|||
|
||||
BackgroundsInit(); /* Start the background accounting */
|
||||
|
||||
/* Update pagers */
|
||||
for (i = 0; i < Conf.desks.num; i++)
|
||||
RedrawPagersForDesktop(i, 0);
|
||||
|
||||
/* The primary event loop */
|
||||
for (;;)
|
||||
WaitEvent();
|
||||
|
|
|
@ -448,15 +448,8 @@ autosave(void)
|
|||
if (!isfile(GetGenericSMFile()))
|
||||
Alert(_("There was an error saving your autosave data - filing\n"
|
||||
"system problems.\n"));
|
||||
/*
|
||||
* if (strcmp(GetSMFile(), GetGenericSMFile()))
|
||||
* {
|
||||
* if (exists(GetGenericSMFile()))
|
||||
* E_rm(GetGenericSMFile());
|
||||
* symlink(GetSMFile(), GetGenericSMFile());
|
||||
* }
|
||||
*/
|
||||
}
|
||||
#if 0 /* Why nuke it? */
|
||||
else
|
||||
{
|
||||
/* char buf[1024];
|
||||
|
@ -468,6 +461,7 @@ autosave(void)
|
|||
Eprintf("autosave: kill %s\n", GetGenericSMFile());
|
||||
E_rm(GetGenericSMFile());
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef HAVE_X11_SM_SMLIB_H
|
||||
|
@ -996,10 +990,17 @@ doSMExit(const void *params)
|
|||
SaveSession(1);
|
||||
ICCCM_SetEInfoOnAll();
|
||||
EwinsSetFree();
|
||||
if (Mode.wm.startup && Mode.wm.exiting)
|
||||
MapUnmap(1);
|
||||
|
||||
if (disp)
|
||||
{
|
||||
XSelectInput(disp, VRoot.win, 0);
|
||||
|
||||
if (Mode.wm.master && init_win_ext)
|
||||
XKillClient(disp, init_win_ext);
|
||||
}
|
||||
|
||||
if ((!params) || (!strcmp((char *)s, "exit")))
|
||||
{
|
||||
callback_die(sm_conn, NULL);
|
||||
|
|
|
@ -93,12 +93,16 @@ MapUnmap(int start)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (Mode.wm.exiting)
|
||||
EMapWindow(disp, wlist[i]);
|
||||
else
|
||||
AddToFamily(wlist[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
XFree(wlist);
|
||||
wlist = NULL;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
|
Loading…
Reference in New Issue