forked from enlightenment/enlightenment
and if for whatever reason e was locked when it restarts... lock again
instantly on restart :) SVN revision: 70559
This commit is contained in:
parent
7c23365cf9
commit
253efca0e2
|
@ -113,11 +113,15 @@ e_desklock_init(void)
|
||||||
EINTERN int
|
EINTERN int
|
||||||
e_desklock_shutdown(void)
|
e_desklock_shutdown(void)
|
||||||
{
|
{
|
||||||
|
Eina_Bool waslocked = EINA_FALSE;
|
||||||
|
|
||||||
|
if (edd) waslocked = EINA_TRUE;
|
||||||
if (!x_fatal)
|
if (!x_fatal)
|
||||||
e_desklock_hide();
|
e_desklock_hide();
|
||||||
if (e_config->desklock_background)
|
if (e_config->desklock_background)
|
||||||
e_filereg_deregister(e_config->desklock_background);
|
e_filereg_deregister(e_config->desklock_background);
|
||||||
|
|
||||||
|
if (waslocked) e_util_env_set("E_DESKLOCK_LOCKED", "locked");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -405,6 +409,8 @@ e_desklock_show(void)
|
||||||
ev = E_NEW(E_Event_Desklock, 1);
|
ev = E_NEW(E_Event_Desklock, 1);
|
||||||
ev->on = 1;
|
ev->on = 1;
|
||||||
ecore_event_add(E_EVENT_DESKLOCK, ev, NULL, NULL);
|
ecore_event_add(E_EVENT_DESKLOCK, ev, NULL, NULL);
|
||||||
|
|
||||||
|
e_util_env_set("E_DESKLOCK_LOCKED", "locked");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -470,6 +476,7 @@ e_desklock_hide(void)
|
||||||
|
|
||||||
_e_desklock_autolock_time = 0.0;
|
_e_desklock_autolock_time = 0.0;
|
||||||
}
|
}
|
||||||
|
e_util_env_set("E_DESKLOCK_LOCKED", "freefreefree");
|
||||||
}
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
|
|
|
@ -132,6 +132,7 @@ main(int argc, char **argv)
|
||||||
Eina_Bool nostartup = EINA_FALSE;
|
Eina_Bool nostartup = EINA_FALSE;
|
||||||
Eina_Bool safe_mode = EINA_FALSE;
|
Eina_Bool safe_mode = EINA_FALSE;
|
||||||
Eina_Bool after_restart = EINA_FALSE;
|
Eina_Bool after_restart = EINA_FALSE;
|
||||||
|
Eina_Bool waslocked = EINA_FALSE;
|
||||||
double t = 0.0, tstart = 0.0;
|
double t = 0.0, tstart = 0.0;
|
||||||
char *s = NULL, buff[32];
|
char *s = NULL, buff[32];
|
||||||
struct sigaction action;
|
struct sigaction action;
|
||||||
|
@ -452,6 +453,9 @@ main(int argc, char **argv)
|
||||||
ecore_exe_run_priority_set(e_config->priority);
|
ecore_exe_run_priority_set(e_config->priority);
|
||||||
locked |= e_config->desklock_start_locked;
|
locked |= e_config->desklock_start_locked;
|
||||||
|
|
||||||
|
s = getenv("E_DESKLOCK_LOCKED");
|
||||||
|
if ((s) && (!strcmp(s, "locked"))) waslocked = EINA_TRUE;
|
||||||
|
|
||||||
TS("E_Scale Init");
|
TS("E_Scale Init");
|
||||||
if (!e_scale_init())
|
if (!e_scale_init())
|
||||||
{
|
{
|
||||||
|
@ -660,6 +664,7 @@ main(int argc, char **argv)
|
||||||
|
|
||||||
if ((locked) && ((!e_config->show_splash) && (!after_restart)))
|
if ((locked) && ((!e_config->show_splash) && (!after_restart)))
|
||||||
e_desklock_show();
|
e_desklock_show();
|
||||||
|
else if (waslocked) e_desklock_show();
|
||||||
|
|
||||||
if (e_config->show_splash)
|
if (e_config->show_splash)
|
||||||
e_init_status_set(_("Setup Message Bus"));
|
e_init_status_set(_("Setup Message Bus"));
|
||||||
|
|
Loading…
Reference in New Issue