remote_surface: fixed wrong handling of consumer hash data 03/217903/5
authorMinJeong Kim <minjjj.kim@samsung.com>
Fri, 15 Nov 2019 11:11:14 +0000 (20:11 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Mon, 18 Nov 2019 09:51:30 +0000 (09:51 +0000)
Change-Id: Ia02ccf83f5474b69fd78b379af427d4eaed4b7e8
Signed-off-by: MinJeong Kim <minjjj.kim@samsung.com>
src/bin/e_comp_wl_rsm.c

index 161afa231c432907c5b8f56bc16b7b00ff9c4b40..6cc307b1f088575a3ce111f0cd130351b5642e25 100644 (file)
@@ -770,25 +770,31 @@ static Eina_Bool
 _remote_surface_cb_effect_end(void *data, E_Client *ec)
 {
    E_Comp_Wl_Remote_Surface *remote_surface;
+   Eina_List *surfaces, *l;
    E_Client *bind_ec;
 
    if (!_rsm) return EINA_TRUE;
    if (!ec) return EINA_TRUE;
 
-   remote_surface = eina_hash_find(_rsm->consumer_hash, &ec);
-   if (!remote_surface) return EINA_TRUE;
-   if (!remote_surface->bind_ec) return EINA_TRUE;
-   if (!remote_surface->need_prebind) return EINA_TRUE;
+   surfaces = eina_hash_find(_rsm->consumer_hash, &ec);
+   if (!surfaces) return EINA_TRUE;
 
-   bind_ec = remote_surface->bind_ec;
+   EINA_LIST_FOREACH(surfaces, l, remote_surface)
+     {
+        if (!remote_surface->bind_ec) continue;
+        if (!remote_surface->need_prebind) continue;
+
+        bind_ec = remote_surface->bind_ec;
 
-   RSMINF("Send \"prebind\" bind_ec:%p", remote_surface->ec,
-          "SURFACE", remote_surface, bind_ec);
+        RSMINF("Send \"prebind\" bind_ec:%p", remote_surface->ec,
+               "SURFACE", remote_surface, bind_ec);
 
-   e_policy_aux_message_send(bind_ec, "tz_remote_surface_mng", "prebind", NULL);
-   remote_surface->need_prebind = EINA_FALSE;
+        e_policy_aux_message_send(bind_ec, "tz_remote_surface_mng", "prebind", NULL);
+        remote_surface->need_prebind = EINA_FALSE;
+
+        _rsm->wait_effect_end --;
+     }
 
-   _rsm->wait_effect_end --;
    if (!_rsm->wait_effect_end)
      {
         e_comp_object_hook_del(_rsm->effect_end);