clean up desklock showing on startup, add env var for checking unlocked state

desklock's layer is below the start splash layer, so this can just be shown any time regardless of whether it's enabled. security++

previously the fact that e was restarting could break out of desklocked startup due to how the env variables were set. now there is a new variable which only gets set when the screen is locked which will force lock on startup even during restarts

T681
This commit is contained in:
Mike Blumenkrantz 2013-12-19 10:53:29 -05:00
parent 56d9c12676
commit cc9c130c24
2 changed files with 5 additions and 8 deletions

View File

@ -346,6 +346,7 @@ works:
ev->suspend = suspend;
ecore_event_add(E_EVENT_DESKLOCK, ev, NULL, NULL);
e_util_env_set("E_DESKLOCK_UNLOCKED", NULL);
e_util_env_set("E_DESKLOCK_LOCKED", "locked");
_e_desklock_state = EINA_TRUE;
return 1;
@ -413,6 +414,7 @@ e_desklock_hide(void)
_e_desklock_autolock_time = 0.0;
}
e_util_env_set("E_DESKLOCK_LOCKED", "freefreefree");
e_util_env_set("E_DESKLOCK_UNLOCKED", "happened");
}
static void

View File

@ -738,9 +738,7 @@ main(int argc, char **argv)
TS("E_Popups Init Done");
_e_main_shutdown_push(e_popup_shutdown);
if ((locked) && ((!e_config->show_splash) && (!after_restart)))
e_desklock_show(EINA_TRUE);
else if (waslocked)
if (waslocked || (locked && ((!after_restart) || (getenv("E_DESKLOCK_UNLOCKED")))))
e_desklock_show(EINA_TRUE);
if (e_config->show_splash)
@ -986,11 +984,8 @@ main(int argc, char **argv)
}
TS("Run Startup Apps Done");
if (!((!e_config->show_splash) || (after_restart)))
{
ecore_timer_add(2.0, _e_main_cb_startup_fake_end, NULL);
if (locked) e_desklock_show(EINA_TRUE);
}
if (e_config->show_splash && (!after_restart))
ecore_timer_add(2.0, _e_main_cb_startup_fake_end, NULL);
TS("E_Container Thaw");
e_container_all_thaw();