e_plane: set ec to plane if usnet_ec and ec is same 02/146702/3
authorChangyeon Lee <cyeon.lee@samsung.com>
Tue, 22 Aug 2017 04:52:52 +0000 (13:52 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Mon, 4 Sep 2017 09:43:56 +0000 (09:43 +0000)
Change-Id: I203023e258844b1272dd158b6d9e3aa34729bdaf
Signed-off-by: Changyeon Lee <cyeon.lee@samsung.com>
src/bin/e_plane.c
src/bin/e_plane.h

index 20997ff6bac959a9e4b6baf4b1826692c18d7a0e..a5f46b9f2148bdfd9086af280d75c13c70703c14 100755 (executable)
@@ -660,6 +660,13 @@ _e_plane_unset_reset(E_Plane *plane)
    if (plane->unset_try)         { plane->unset_try = EINA_FALSE;       print_log = EINA_TRUE; }
    if (plane->unset_commit)      { plane->unset_commit = EINA_FALSE;    print_log = EINA_TRUE; }
 
+   if (plane->unset_ec)
+     {
+        e_object_unref(E_OBJECT(plane->unset_ec));
+        plane->unset_ec = NULL;
+        print_log = EINA_TRUE;
+     }
+
    if (print_log && plane_trace_debug)
      ELOGF("E_PLANE", " Plane(%p) Unset flags Reset", NULL, NULL, plane);
 }
@@ -679,6 +686,8 @@ _e_plane_unset_candidate_set(E_Plane *plane, Eina_Bool sync)
      }
 
    plane->unset_candidate = EINA_TRUE;
+   plane->unset_ec = plane->ec;
+   e_object_ref(E_OBJECT(plane->unset_ec));
 }
 
 static Eina_Bool
@@ -2009,8 +2018,13 @@ e_plane_ec_set(E_Plane *plane, E_Client *ec)
                       e_plane_is_unset_try(plane) ||
                       plane->unset_commit)
                     {
-                       INF("Trying to unset plane:%p zpos:%d", plane, plane->zpos);
-                       return EINA_FALSE;
+                       if (plane->unset_ec != ec)
+                         {
+                            INF("Trying to unset plane:%p zpos:%d", plane, plane->zpos);
+                            return EINA_FALSE;
+                         }
+                       else
+                         _e_plane_unset_reset(plane);
                     }
 
                   if ((plane->renderer) && (plane->role != E_PLANE_ROLE_OVERLAY))
index 1a3e9f4474b1b292a62754c08254862defbb02a1..496c133f5f5f6b538658ebcc1edfd4fcb30d6b30 100755 (executable)
@@ -71,6 +71,7 @@ struct _E_Plane
    Eina_Bool             unset_try;
    Eina_Bool             unset_commit;
    int                   unset_counter;
+   E_Client             *unset_ec;
 
    Eina_Bool             is_video;
    Eina_Bool             reserved_video;