From 4d5ff1ee3a1aace54772e105d98ac7593b525436 Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Wed, 26 Apr 2017 15:22:27 +0900 Subject: [PATCH] Add new hint to enable/disable auto raising window feature If the hint exists, appcore will raise the window when getting the reset request. Adds: - APPCORE_UI_BASE_HINT_WINDOW_AUTO_CONTROL Change-Id: I31b0ce8c04daca5a12dcb1f307d1efcae6a005c6 Signed-off-by: Hwankyu Jhun --- include/appcore_ui_base.h | 1 + src/legacy/appcore-efl.c | 3 ++- src/ui_base/appcore_ui_base.c | 6 ++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/include/appcore_ui_base.h b/include/appcore_ui_base.h index f11aa3c..a92b430 100644 --- a/include/appcore_ui_base.h +++ b/include/appcore_ui_base.h @@ -44,6 +44,7 @@ enum appcore_ui_base_hint { APPCORE_UI_BASE_HINT_WINDOW_STACK_CONTROL = 0x2, APPCORE_UI_BASE_HINT_BG_LAUNCH_CONTROL = 0x4, APPCORE_UI_BASE_HINT_HW_ACC_CONTROL = 0x8, + APPCORE_UI_BASE_HINT_WINDOW_AUTO_CONTROL = 0x10, }; int appcore_ui_base_on_receive(aul_type type, bundle *b); diff --git a/src/legacy/appcore-efl.c b/src/legacy/appcore-efl.c index 3046d9f..17053ae 100644 --- a/src/legacy/appcore-efl.c +++ b/src/legacy/appcore-efl.c @@ -106,7 +106,8 @@ EXPORT_API int appcore_efl_init(const char *name, int *argc, char ***argv, APPCORE_UI_BASE_HINT_WINDOW_GROUP_CONTROL | APPCORE_UI_BASE_HINT_WINDOW_STACK_CONTROL | APPCORE_UI_BASE_HINT_BG_LAUNCH_CONTROL | - APPCORE_UI_BASE_HINT_HW_ACC_CONTROL); + APPCORE_UI_BASE_HINT_HW_ACC_CONTROL | + APPCORE_UI_BASE_HINT_WINDOW_AUTO_CONTROL); return ret; } diff --git a/src/ui_base/appcore_ui_base.c b/src/ui_base/appcore_ui_base.c index 76681c5..8872ac4 100644 --- a/src/ui_base/appcore_ui_base.c +++ b/src/ui_base/appcore_ui_base.c @@ -444,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) -- 2.7.4