summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2013-12-19 10:53:29 -0500
committerMike Blumenkrantz <zmike@samsung.com>2013-12-19 10:55:56 -0500
commitcc9c130c24e23d9100aa703cd5c949f297059329 (patch)
tree3a8802fa1d77df986a2e5a7c019fe81c64f80c7d /src
parent56d9c12676a69ca600bfff52525aef55d0f39949 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/bin/e_desklock.c2
-rw-r--r--src/bin/e_main.c11
2 files changed, 5 insertions, 8 deletions
diff --git a/src/bin/e_desklock.c b/src/bin/e_desklock.c
index bcdd857cc..cddd54198 100644
--- a/src/bin/e_desklock.c
+++ b/src/bin/e_desklock.c
@@ -346,6 +346,7 @@ works:
346 ev->suspend = suspend; 346 ev->suspend = suspend;
347 ecore_event_add(E_EVENT_DESKLOCK, ev, NULL, NULL); 347 ecore_event_add(E_EVENT_DESKLOCK, ev, NULL, NULL);
348 348
349 e_util_env_set("E_DESKLOCK_UNLOCKED", NULL);
349 e_util_env_set("E_DESKLOCK_LOCKED", "locked"); 350 e_util_env_set("E_DESKLOCK_LOCKED", "locked");
350 _e_desklock_state = EINA_TRUE; 351 _e_desklock_state = EINA_TRUE;
351 return 1; 352 return 1;
@@ -413,6 +414,7 @@ e_desklock_hide(void)
413 _e_desklock_autolock_time = 0.0; 414 _e_desklock_autolock_time = 0.0;
414 } 415 }
415 e_util_env_set("E_DESKLOCK_LOCKED", "freefreefree"); 416 e_util_env_set("E_DESKLOCK_LOCKED", "freefreefree");
417 e_util_env_set("E_DESKLOCK_UNLOCKED", "happened");
416} 418}
417 419
418static void 420static void
diff --git a/src/bin/e_main.c b/src/bin/e_main.c
index 9cd6921d1..5da7b2d17 100644
--- a/src/bin/e_main.c
+++ b/src/bin/e_main.c
@@ -738,9 +738,7 @@ main(int argc, char **argv)
738 TS("E_Popups Init Done"); 738 TS("E_Popups Init Done");
739 _e_main_shutdown_push(e_popup_shutdown); 739 _e_main_shutdown_push(e_popup_shutdown);
740 740
741 if ((locked) && ((!e_config->show_splash) && (!after_restart))) 741 if (waslocked || (locked && ((!after_restart) || (getenv("E_DESKLOCK_UNLOCKED")))))
742 e_desklock_show(EINA_TRUE);
743 else if (waslocked)
744 e_desklock_show(EINA_TRUE); 742 e_desklock_show(EINA_TRUE);
745 743
746 if (e_config->show_splash) 744 if (e_config->show_splash)
@@ -986,11 +984,8 @@ main(int argc, char **argv)
986 } 984 }
987 TS("Run Startup Apps Done"); 985 TS("Run Startup Apps Done");
988 986
989 if (!((!e_config->show_splash) || (after_restart))) 987 if (e_config->show_splash && (!after_restart))
990 { 988 ecore_timer_add(2.0, _e_main_cb_startup_fake_end, NULL);
991 ecore_timer_add(2.0, _e_main_cb_startup_fake_end, NULL);
992 if (locked) e_desklock_show(EINA_TRUE);
993 }
994 989
995 TS("E_Container Thaw"); 990 TS("E_Container Thaw");
996 e_container_all_thaw(); 991 e_container_all_thaw();