Support executable type of IME 24/61524/1
authorJihoon Kim <jihoon48.kim@samsung.com>
Tue, 8 Mar 2016 11:54:20 +0000 (20:54 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Tue, 8 Mar 2016 11:54:34 +0000 (20:54 +0900)
Change-Id: Ia7e8a69324e457e11bfd9bf49ece7f86811cc46f

CMakeLists.txt
packaging/libscl-core.spec
src/sclcoreimpl.cpp

index e065ab3..18d7cea 100644 (file)
@@ -32,6 +32,7 @@ SET(PKGS_CHECK_MODULES
         isf
         vconf
         libscl-common
+        capi-appfw-application
         )
 
 IF (with_wayland)
index 45ae01d..8f50dde 100644 (file)
@@ -26,6 +26,7 @@ BuildRequires:  pkgconfig(ecore-x)
 BuildRequires:  pkgconfig(x11)
 %endif
 BuildRequires:  pkgconfig(libscl-common)
+BuildRequires:  pkgconfig(capi-appfw-application)
 
 
 %description
index 66b20a3..84a6935 100644 (file)
@@ -16,6 +16,8 @@
  */
 
 #include "sclcoreimpl.h"
+#include <app_common.h>
+#include <dlog.h>
 
 using namespace scl;
 
@@ -284,6 +286,27 @@ void CSCLCoreImpl::on_run(const sclchar *uuid, const sclchar *display)
 
 void CSCLCoreImpl::run()
 {
+    m_core_ui.init();
+    m_connection.init();
+
+    if (!m_uuid) {
+        char *appid = NULL;
+        app_get_id(&appid);
+
+        LOGD("appid : '%s'\n", appid);
+
+        if (appid) {
+            m_uuid = strdup(appid);
+            free(appid);
+        }
+    }
+
+    if (!m_display) {
+        const char *display = getenv("DISPLAY");
+        LOGD("display env : '%s'\n", display);
+        m_display = display ? strdup(display) : strdup(":0");
+    }
+
     m_core_ui.run(m_display);
 
     m_connection.fini();