Show input panel immediately when set_ready received 74/137374/4
authorJi-hoon Lee <dalton.lee@samsung.com>
Wed, 5 Jul 2017 11:01:40 +0000 (20:01 +0900)
committerJi-hoon Lee <dalton.lee@samsung.com>
Fri, 7 Jul 2017 05:14:11 +0000 (14:14 +0900)
Since there are cases that CLIENT_BUFFER_CHANGE event
is not emitted after set_ready, we will try to show
input panel immediately on set_ready request.
The set_ready request will be sent from input panel side
when the RENDER_PRE event is processed, we could assume
the input panel window might have finished rendering.

Change-Id: I09e34aa1faa065c3113acfd91c2ab8e1fbea896e

src/e_mod_input_panel.c

index 5f30d86..f17a01e 100644 (file)
@@ -35,7 +35,6 @@ struct _E_Input_Panel_Surface
 
    Eina_Bool panel;
    Eina_Bool showing;
-   Eina_Bool wait_update; /* wait update state for individual input panel surface */
    Eina_Bool need_show;
 };
 
@@ -274,37 +273,6 @@ _ips_show(E_Client *ec)
    e_comp_object_damage(ec->frame, 0, 0, ec->w, ec->h);
 }
 
-static Eina_Bool
-_ips_cb_buffer_change(void *data, int type, void *event)
-{
-   E_Event_Client *ev = event;
-   E_Input_Panel_Surface *ips = data;
-
-   if (!ips || !ev)
-     goto end;
-
-   if (ips->ec != ev->ec)
-     goto end;
-
-   if (!ips->wait_update)
-     goto clean;
-
-   LOGD("IPS::BUFFER::CHANGED::DEFER_SHOW\n");
-
-   if (_e_input_panel_is_effect_running(ips->ec))
-     ips->need_show = EINA_TRUE;
-   else
-     _ips_show(ips->ec);
-
-   ips->wait_update = EINA_FALSE;
-
-clean:
-   E_FREE_FUNC(ips->eh.buf_change, ecore_event_handler_del);
-
-end:
-   return ECORE_CALLBACK_PASS_ON;
-}
-
 static void
 _e_input_panel_surface_visible_update(E_Input_Panel_Surface *ips)
 {
@@ -322,33 +290,14 @@ _e_input_panel_surface_visible_update(E_Input_Panel_Surface *ips)
         if (panel_show_need_rerun)
           e_input_panel_show_need_rerun_set(EINA_FALSE);
 
-        if (_TV)
-          {
-             _e_input_panel_position_set(ec, ec->client.w, ec->client.h);
-             ec->visible = EINA_TRUE;
-             evas_object_geometry_set(ec->frame, ec->x, ec->y, ec->w, ec->h);
-             evas_object_show(ec->frame);
-             e_comp_object_damage(ec->frame, 0, 0, ec->w, ec->h);
-          }
+        if (_e_input_panel_is_effect_running(ips->ec))
+          ips->need_show = EINA_TRUE;
         else
-          {
-             if (ec->visible)
-               return;
-
-             LOGD("IPS::DEFER_SHOW::ADD");
-             ips->wait_update = EINA_TRUE;
-             if (!ips->eh.buf_change)
-               {
-                  ips->eh.buf_change =
-                     ecore_event_handler_add(E_EVENT_CLIENT_BUFFER_CHANGE,
-                                             _ips_cb_buffer_change, ips);
-               }
-          }
+          _ips_show(ips->ec);
      }
    else
      {
         LOGD("IPS::DEFER_SHOW::HIDE\n");
-        ips->wait_update = EINA_FALSE;
         ec->visible = EINA_FALSE;
         /* We have to reset the flag of pending_show to prevent showing after
          * finish the rotation. Directly set this value, since there is no way