Remove focus change on popup ok/cancel button while keyboard is showing 90/91190/2
authorJiwan Kim <ji-wan.kim@samsung.com>
Thu, 6 Oct 2016 06:40:14 +0000 (15:40 +0900)
committerJiwan Kim <ji-wan.kim@samsung.com>
Thu, 6 Oct 2016 07:34:52 +0000 (16:34 +0900)
 - This patch is for TSAM-8444

Change-Id: I1f7d2e0041c5f1ced2649a72691d6396b6a82e47
Signed-off-by: Jiwan Kim <ji-wan.kim@samsung.com>
src/layout/layout_network.c

index f798926..e931606 100644 (file)
@@ -736,8 +736,31 @@ static void _popup_key_down_cb(int id, void *data, Evas *e, Evas_Object *obj,
        }
 }
 
+static void _popup_mouse_move_cb(int id, void *data, Evas *e, Evas_Object *obj,
+               Evas_Event_Mouse_Move *ev)
+{
+       struct _priv *priv = data;
+
+       if (!priv || !obj) {
+               _ERR("Invalid argument.");
+               return;
+       }
+
+       if (priv->passcode_entry) {
+               Ecore_IMF_Context *ctx;
+               Ecore_IMF_Input_Panel_State state;
+               ctx = (Ecore_IMF_Context*)elm_entry_imf_context_get(priv->passcode_entry);
+               state = ecore_imf_context_input_panel_state_get(ctx);
+
+               if (state == ECORE_IMF_INPUT_PANEL_STATE_HIDE) {
+                       if (!elm_object_focus_get(obj))
+                               elm_object_focus_set(obj, EINA_TRUE);
+               }
+       }
+}
+
 static input_handler _popup_input_handler = {
-       .mouse_move = _mouse_move_cb,
+       .mouse_move = _popup_mouse_move_cb,
        .clicked = _popup_clicked_cb,
        .key_down = _popup_key_down_cb
 };