diff options
author | Ryuan Choi <ryuan.choi@gmail.com> | 2014-06-12 15:50:27 +0900 |
---|---|---|
committer | Ryuan Choi <ryuan.choi@gmail.com> | 2014-06-12 15:50:27 +0900 |
commit | ce6f8f8380857eeebe0407087f9f09b9305065c1 (patch) | |
tree | 34093ea000c5712d629f8b06c166be58761c0939 | |
parent | ef113cafc390bc3a6792c86ae56a7f42cfe89783 (diff) | |
download | elementary-ce6f8f8380857eeebe0407087f9f09b9305065c1.tar.gz |
elm_web2: Implement _elm_web_elm_widget_on_focus
-rw-r--r-- | src/lib/elm_web2.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/src/lib/elm_web2.c b/src/lib/elm_web2.c index cc0bd98f7..f5a92c4ea 100644 --- a/src/lib/elm_web2.c +++ b/src/lib/elm_web2.c @@ -607,8 +607,26 @@ _elm_web_elm_widget_theme_apply(Eo *obj, Elm_Web_Data *sd EINA_UNUSED) EOLIAN static Eina_Bool _elm_web_elm_widget_on_focus(Eo *obj, Elm_Web_Data *sd) { - (void)obj; - (void)sd; + Evas_Object *top; + + ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_TRUE); + Eina_Bool int_ret = EINA_FALSE; + + eo_do_super(obj, MY_CLASS, int_ret = elm_obj_widget_on_focus()); + if (!int_ret) return EINA_TRUE; + + top = elm_widget_top_get(obj); + + if (elm_object_focus_get(obj)) + { + evas_object_focus_set(wd->resize_obj, EINA_TRUE); + if (top) elm_win_keyboard_mode_set(top, sd->input_method); + } + else + { + evas_object_focus_set(wd->resize_obj, EINA_FALSE); + if (top) elm_win_keyboard_mode_set(top, ELM_WIN_KEYBOARD_OFF); + } return EINA_TRUE; } |