Early init ecore regardless of the current mode
authorSangwook Kim <swift.kim@samsung.com>
Fri, 20 Sep 2019 05:20:48 +0000 (14:20 +0900)
committer이형주/Common Platform Lab(SR)/Staff Engineer/삼성전자 <leee.lee@samsung.com>
Sun, 29 Sep 2019 22:41:41 +0000 (07:41 +0900)
NativeLauncher/launcher/launcher.cc
NativeLauncher/launcher/main.cc

index 14a7d18..ecb7131 100644 (file)
@@ -127,7 +127,7 @@ typedef void (*elm_config_accel_preference_set_ptr)(const char *pref);
 typedef void* (*elm_win_add_ptr)(void* parent, const char* name, int type);
 typedef void (*elm_win_precreated_object_set_ptr)(void* win);
 
-static void preCreateWindow(bundle *extra, int type, void *userData)
+static void preCreateWindow()
 {
        struct stat sb;
        if (stat(ELEMENTARY_PATH, &sb) != 0) {
@@ -182,8 +182,7 @@ int LaunchpadAdapterImpl::loaderMain(int argc, char* argv[])
        __argc = argc;
        __argv = argv;
        callbacks.create = [](bundle *extra, int type, void *userData) {
-               ecore_init();
-               preCreateWindow(extra, type, userData);
+               preCreateWindow();
                WITH_SELF(userData) {
                        if (self->onCreate != nullptr)
                                self->onCreate();
index cac7e39..9de8788 100644 (file)
@@ -73,8 +73,11 @@ extern "C" int realMain(int argc, char *argv[], const char* mode)
 
        std::unique_ptr<CoreRuntime> runtime(new CoreRuntime(mode));
 
+       // Intiailize ecore first (signal handlers, etc.) before runtime init.
+       ecore_init();
+
        if (corerunMode) {
-               _INFO("##### Run it corerun Mode #########");
+               _INFO("##### Run in corerun mode #####");
                char appId[APPID_MAX_LENGTH] = {0,};
                std::string appRoot;
                snprintf(appId, 16, "%s", "dotnet-launcher");
@@ -97,7 +100,7 @@ extern "C" int realMain(int argc, char *argv[], const char* mode)
                        return 1;
                }
        } else if (standaloneMode) {
-               _INFO("##### Run it standalone Mode #########");
+               _INFO("##### Run in standalone mode #####");
                char appId[APPID_MAX_LENGTH] = {0,};
                std::string appRoot;
                if (AUL_R_OK == aul_app_get_appid_bypid(getpid(), appId, sizeof(appId))) {