Change the keyboard mode rule on focus-in event 22/172922/1
authorSungmin Kwak <sungmin.kwak@samsung.com>
Tue, 13 Mar 2018 05:25:06 +0000 (14:25 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Mon, 19 Mar 2018 00:50:41 +0000 (00:50 +0000)
In TV specific, set the keyboard mode to SW only when the focus state is changed from OUT to IN
Change-Id: Ia02f06b6f13c36e21d455de3b5594b594c3e443b
(cherry picked from commit d8bc8fe3ab3af93a7ed1b5ac68422a6dd0a66e1a)

ism/extras/wayland_immodule/wayland_imcontext.c

index 6a75c03..61ee1b5 100644 (file)
@@ -2800,6 +2800,8 @@ _prediction_hint_data_foreach_cb(const Eina_Hash *hash, const void *key,
 void
 wayland_im_context_focus_in(Ecore_IMF_Context *ctx)
 {
+    Eina_Bool focused = g_focused;
+
     LOGD ("ctx : %p. enable : %d, on demand : %d", ctx,
           ecore_imf_context_input_panel_enabled_get(ctx),
           ecore_imf_context_input_panel_show_on_demand_get (ctx));
@@ -2824,7 +2826,8 @@ wayland_im_context_focus_in(Ecore_IMF_Context *ctx)
     }
 
     if (_TV) {
-        if (hw_keyboard_mode == EINA_TRUE) {
+        // Set to SW keyboard mode only when the focus state is changed from OUT to IN.
+        if (!focused && hw_keyboard_mode == EINA_TRUE) {
             vconf_set_bool (VCONFKEY_ISF_HW_KEYBOARD_INPUT_DETECTED, 0);
             hw_keyboard_mode = EINA_FALSE;
         }