Revert "Revert "Add codes for setting voice touch as auto mode""
[platform/core/appfw/app-core.git] / src / ui_base / appcore_ui_base.c
index b4b13b2..8872ac4 100644 (file)
@@ -49,6 +49,7 @@
 #include "appcore_base.h"
 #include "appcore_ui_base.h"
 #include "appcore_ui_base_private.h"
+#include "appcore_ui_plugin.h"
 
 enum app_state {
        AS_NONE,
@@ -443,8 +444,10 @@ static void __do_start(bundle *b)
                }
        }
 
-       if (!bg_state)
-               __raise_win();
+       if (__context.hint & APPCORE_UI_BASE_HINT_WINDOW_AUTO_CONTROL) {
+               if (!bg_state)
+                       __raise_win();
+       }
 }
 
 EXPORT_API int appcore_ui_base_on_receive(aul_type type, bundle *b)
@@ -687,6 +690,7 @@ EXPORT_API int appcore_ui_base_init(appcore_ui_base_ops ops, int argc, char **ar
        int r;
        bool is_vc_vt_automode = false;
 
+       appcore_ui_plugin_init(&ops, &hint);
        aul_app_get_appid_bypid(getpid(), appid, sizeof(appid));
        __context.ops = ops;
        __context.data = data;
@@ -745,6 +749,7 @@ EXPORT_API void appcore_ui_base_fini(void)
        int r;
 
        appcore_base_fini();
+       appcore_ui_plugin_fini();
 
        if (__context.hshow)
                ecore_event_handler_del(__context.hshow);