Implement to send input panel state 78/42978/3
authorJihoon Kim <jihoon48.kim@samsung.com>
Mon, 6 Jul 2015 12:58:22 +0000 (21:58 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Tue, 7 Jul 2015 07:33:58 +0000 (16:33 +0900)
Change-Id: I0fcf9cf500646c3bc7386ab8ebe641616f44d295

protocol/text.xml
src/e_mod_main.c

index def7c27..64964a7 100644 (file)
       </description>
       <arg name="map" type="array"/>
     </event>
+    <enum name="input_panel_state">
+      <entry name="hide" value="0" summary="Notification prior to the dismissal of the input panel"/>
+      <entry name="show" value="1" summary="Notification after the display of the input panel"/>
+    </enum>
     <event name="input_panel_state">
       <description summary="state of the input panel">
         Notify when the visibility state of the input panel changed.
index 48bdee9..4f417ec 100644 (file)
@@ -483,7 +483,13 @@ _e_text_input_cb_input_panel_show(struct wl_client *client EINA_UNUSED, struct w
    EINA_LIST_FOREACH(text_input->input_methods, l, input_method)
      {
         if (input_method->model == text_input)
-          e_input_panel_visibility_change(EINA_TRUE);
+          {
+             e_input_panel_visibility_change(EINA_TRUE);
+
+             if (text_input->resource)
+               wl_text_input_send_input_panel_state(text_input->resource,
+                                                    WL_TEXT_INPUT_INPUT_PANEL_STATE_SHOW);
+          }
      }
 }
 
@@ -507,7 +513,13 @@ _e_text_input_cb_input_panel_hide(struct wl_client *client EINA_UNUSED, struct w
    EINA_LIST_FOREACH(text_input->input_methods, l, input_method)
      {
         if (input_method && (input_method->model == text_input))
-          e_input_panel_visibility_change(EINA_FALSE);
+          {
+             if (text_input->resource)
+               wl_text_input_send_input_panel_state(text_input->resource,
+                                                    WL_TEXT_INPUT_INPUT_PANEL_STATE_HIDE);
+
+             e_input_panel_visibility_change(EINA_FALSE);
+          }
      }
 }