e_policy_visibility: handle uniconify_render pending job of the internal ec 19/309019/1
authorDoyoun Kang <doyoun.kang@samsung.com>
Wed, 3 Apr 2024 07:04:48 +0000 (16:04 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Thu, 4 Apr 2024 01:37:01 +0000 (10:37 +0900)
There was a bug that the uniconify_render pending job of the internal EC was timeout.

The internal EC cannot send buffer attach event, so the _e_vis_grab_release() cannot be called
while it is under uniconify pending job.
So, we add code handling show callback of internal EC to release uniconify_pending job.

Change-Id: Ic74d74e33d48be6d0a4cfa46a43dfb7266bf805f

src/bin/e_policy_visibility.c [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 11f9e4d..1c916cf
@@ -873,25 +873,15 @@ _e_vis_grab_job_filter(E_Vis_Grab *grab, E_Vis_Job_Type job_type)
    return grab->type & job_type;
 }
 
-static Eina_Bool
-_e_vis_client_cb_buffer_attach(void *data, int type EINA_UNUSED, void *event)
+static void
+_e_vis_client_handle_buffer_attach(E_Vis_Client *vc)
 {
-   E_Vis_Client *vc;
    E_Vis_Grab *grab;
    E_Client *ec;
-   E_Event_Client *ev;
-   E_Client *provider_ec;
    Eina_List *l;
 
-   ev = event;
-   vc = data;
-   provider_ec = e_comp_wl_remote_surface_bound_provider_ec_get(vc->ec);
-   if (vc->ec != ev->ec && provider_ec != ev->ec)
-     goto renew;
-
    ec = vc->ec;
-
-   VS_INF(ec, "FINISH Uniconify render(ev:%p, vc:%p, provider:%p)", ev->ec, vc->ec, provider_ec);
+   if (!ec) return;
 
    /* force update
     * NOTE: this update can invoke some functions related to visibility grab */
@@ -911,6 +901,28 @@ _e_vis_client_cb_buffer_attach(void *data, int type EINA_UNUSED, void *event)
      }
 
    E_FREE_FUNC(vc->buf_attach, ecore_event_handler_del);
+}
+
+static Eina_Bool
+_e_vis_client_cb_buffer_attach(void *data, int type EINA_UNUSED, void *event)
+{
+   E_Vis_Client *vc;
+   E_Client *ec;
+   E_Event_Client *ev;
+   E_Client *provider_ec;
+
+   ev = event;
+   vc = data;
+   provider_ec = e_comp_wl_remote_surface_bound_provider_ec_get(vc->ec);
+   if (vc->ec != ev->ec && provider_ec != ev->ec)
+     goto renew;
+
+   ec = vc->ec;
+
+   VS_INF(ec, "FINISH Uniconify render(ev:%p, vc:%p, provider:%p)", ev->ec, vc->ec, provider_ec);
+
+   _e_vis_client_handle_buffer_attach(vc);
+
 renew:
    return ECORE_CALLBACK_PASS_ON;
 }
@@ -1073,6 +1085,16 @@ _e_vis_client_cb_evas_show(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Obj
    VS_DBG(ec, "CALLBACK 'SHOW'...");
    _e_vis_update_foreground_job_queue();
    E_VIS_CLIENT_GET_OR_RETURN(vc, ec);
+
+   if (ec->internal)
+     {
+        if (vc->buf_attach)
+          {
+             VS_INF(ec, "FINISH Uniconify render of internal window");
+             _e_vis_client_handle_buffer_attach(vc);
+          }
+     }
+
    if (vc->state != E_VIS_ICONIFY_STATE_RUNNING_UNICONIFY)
      {
         vc->state = E_VIS_ICONIFY_STATE_UNICONIC;