1474c3d
commit 01ac84035fd09d1ffe9dc224b32325b5b15f591b
1474c3d
Author: Mike Blumenkrantz <zmike@osg.samsung.com>
1474c3d
Date:   Thu Apr 28 17:56:59 2016 -0400
1474c3d
1474c3d
    ensure that the startup apps cache handler has run before trying to start apps
1474c3d
    
1474c3d
    fixes timing issues when running startup apps
1474c3d
1474c3d
diff -up enlightenment-0.20.7/src/bin/e_startup.c.bad enlightenment-0.20.7/src/bin/e_startup.c
1474c3d
--- enlightenment-0.20.7/src/bin/e_startup.c.bad	2016-05-13 12:45:52.346765979 -0400
1474c3d
+++ enlightenment-0.20.7/src/bin/e_startup.c	2016-05-13 12:45:58.698727658 -0400
1474c3d
@@ -15,6 +15,7 @@ static E_Order *startup_apps = NULL;
1474c3d
 static int start_app_pos = -1;
1474c3d
 static Ecore_Event_Handler *desktop_cache_update_handler = NULL;
1474c3d
 
1474c3d
+static Eina_Bool desktop_cache_update = EINA_FALSE;
1474c3d
 static Eina_Bool started = EINA_FALSE;
1474c3d
 
1474c3d
 /* externally accessible functions */
1474c3d
@@ -46,7 +47,7 @@ e_startup_mode_set(E_Startup_Mode mode)
1474c3d
 E_API void
1474c3d
 e_startup(void)
1474c3d
 {
1474c3d
-   if (desktop_cache_update_handler)
1474c3d
+   if (!desktop_cache_update)
1474c3d
      started = EINA_TRUE;
1474c3d
    else
1474c3d
      _e_startup();
1474c3d
@@ -116,6 +117,7 @@ _e_startup_event_cb(void *data, int ev_t
1474c3d
         _e_startup_error_dialog("E: Efreet could not build cache. "
1474c3d
                                 "Please check your DBus setup");
1474c3d
      }
1474c3d
+   desktop_cache_update = EINA_TRUE;
1474c3d
    E_FREE_FUNC(desktop_cache_update_handler, ecore_event_handler_del);
1474c3d
    buf = data;
1474c3d
    startup_apps = e_order_new(buf);