e_comp_wl: remove all e_client elements from post_updates list before adding it
authorGwanglim Lee <gl77.lee@samsung.com>
Mon, 27 Jul 2015 14:14:44 +0000 (23:14 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Mon, 27 Jul 2015 14:14:44 +0000 (23:14 +0900)
Change-Id: Id3ffa99d8477821d7df92a405781753446a2d5b1

src/bin/e_client.c
src/bin/e_comp_wl.c

index ab72a21f6b2659e715aef84cbf32e91e15640d00..411105f9dee0e839825e551622ef29ea483d9a09 100644 (file)
@@ -444,7 +444,14 @@ _e_client_revert_focus(E_Client *ec)
 static void
 _e_client_free(E_Client *ec)
 {
-   ec->comp->post_updates = eina_list_remove(ec->comp->post_updates, ec);
+   Eina_List *l, *ll;
+   E_Client *ec2;
+   int count = 0;
+   EINA_LIST_FOREACH_SAFE(e_comp->post_updates, l, ll, ec2)
+     {
+        if (ec2 == ec)
+          e_comp->post_updates = eina_list_remove_list(e_comp->post_updates, l);
+     }
 
    e_comp_object_redirected_set(ec->frame, 0);
    e_comp_object_render_update_del(ec->frame);
index e249a26035d9c6648dd31f9322ab59fbc47d6471..e85e887e696aa8810d02136cfe06f749a8577c4a 100644 (file)
@@ -2203,6 +2203,14 @@ _e_comp_wl_subsurface_commit_from_cache(E_Client *ec)
    /* schedule repaint */
    if (e_pixmap_refresh(ec->pixmap))
      {
+        Eina_List *l, *ll;
+        E_Client *ec2;
+        int count = 0;
+        EINA_LIST_FOREACH_SAFE(e_comp->post_updates, l, ll, ec2)
+          {
+             if (ec2 == ec)
+               e_comp->post_updates = eina_list_remove_list(e_comp->post_updates, l);
+          }
         e_comp->post_updates = eina_list_append(e_comp->post_updates, ec);
         e_object_ref(E_OBJECT(ec));
      }
@@ -3405,6 +3413,14 @@ e_comp_wl_surface_commit(E_Client *ec)
    /* schedule repaint */
    if (e_pixmap_refresh(ec->pixmap))
      {
+        Eina_List *l, *ll;
+        E_Client *ec2;
+        int count = 0;
+        EINA_LIST_FOREACH_SAFE(e_comp->post_updates, l, ll, ec2)
+          {
+             if (ec2 == ec)
+               e_comp->post_updates = eina_list_remove_list(e_comp->post_updates, l);
+          }
         e_comp->post_updates = eina_list_append(e_comp->post_updates, ec);
         e_object_ref(E_OBJECT(ec));
      }