Show input panel immediately when set_ready received 39/137839/1
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 08:49:21 +0000 (17:49 +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 fd385850e323c4a7cc93ad28e0a7fdd2726ca3da..6ebc08a17bbf20cef4c19840dc11519605628785 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;
 };
 
@@ -266,37 +265,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)
 {
@@ -314,22 +282,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 (ec->visible)
-          return;
-
-        LOGD("IPS::DEFER_SHOW::ADD\n");
-        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);
-          }
+        if (_e_input_panel_is_effect_running(ips->ec))
+          ips->need_show = EINA_TRUE;
+        else
+          _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