From: Sungmin Kwak Date: Fri, 16 Oct 2015 08:29:33 +0000 (+0900) Subject: Make IME Selector popup rotate with the caller application X-Git-Tag: submit/tizen/20151019.103005~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1ee6d7589dbae238182441f53a3b909551b6f86e;p=platform%2Fcore%2Fuifw%2Finputmethod-setting.git Make IME Selector popup rotate with the caller application If the caller application supports only portrait mode, the popup would not rotate. Change-Id: Ide999eb2499ba14a9d8bd8cf04ad86e4fc1fb5a5 --- diff --git a/im_setting_selector/input_method_setting_selector.h b/im_setting_selector/input_method_setting_selector.h index 73fe5e7..00b91c0 100644 --- a/im_setting_selector/input_method_setting_selector.h +++ b/im_setting_selector/input_method_setting_selector.h @@ -34,9 +34,7 @@ enum { }; enum { - APP_TYPE_SETTING = 1, - APP_TYPE_SETTING_NO_ROTATION, - APP_TYPE_NORMAL, + APP_TYPE_NORMAL = 1, }; typedef struct _appdata { diff --git a/im_setting_selector/input_method_setting_selector_ui.cpp b/im_setting_selector/input_method_setting_selector_ui.cpp index e3e1e88..c800b99 100644 --- a/im_setting_selector/input_method_setting_selector_ui.cpp +++ b/im_setting_selector/input_method_setting_selector_ui.cpp @@ -56,18 +56,29 @@ static void im_setting_selector_text_domain_set(void) static Evas_Object * im_setting_selector_main_window_create(const char *name) { - int rots[4] = {0, 90, 180, 270}; - Evas_Object *eo = NULL; - int w = -1, h = -1; - eo = elm_win_add(NULL, name, ELM_WIN_BASIC); - + Evas_Object *eo = elm_win_add(NULL, name, ELM_WIN_BASIC); if (eo) { + Evas *e; + Ecore_Evas *ee; + Evas_Coord w = -1, h = -1; + elm_win_title_set(eo, name); elm_win_borderless_set(eo, EINA_TRUE); elm_win_alpha_set(eo, EINA_TRUE); elm_win_conformant_set(eo, EINA_TRUE); elm_win_autodel_set(eo, EINA_TRUE); - elm_win_wm_rotation_available_rotations_set(eo, rots, 4); + if (elm_win_wm_rotation_supported_get (eo)) { + int rots[4] = {0, 90, 180, 270}; + elm_win_wm_rotation_available_rotations_set(eo, rots, 4); + } + e = evas_object_evas_get(eo); + if (e) { + ee = ecore_evas_ecore_evas_get(e); + if (ee) { + ecore_evas_name_class_set(ee, "SYSTEM_POPUP", "SYSTEM_POPUP"); + } + } + elm_win_screen_size_get(eo, NULL, NULL, &w, &h); if (w > 0 && h > 0) { evas_object_resize(eo, w, h);