e_plane: set ec to plane if usnet_ec and ec is same
authorChangyeon Lee <cyeon.lee@samsung.com>
Tue, 22 Aug 2017 04:52:52 +0000 (13:52 +0900)
committerSung-Jin Park <sj76.park@samsung.com>
Wed, 20 Sep 2017 04:31:34 +0000 (13:31 +0900)
Change-Id: I203023e258844b1272dd158b6d9e3aa34729bdaf
Signed-off-by: Changyeon Lee <cyeon.lee@samsung.com>
src/bin/e_plane.c
src/bin/e_plane.h

index a9f62e39f4ec66ba8f5e4629859b298d0efd66b2..a89c679bc0e2c9163cd9798eead0fb0420d17f4d 100644 (file)
@@ -649,6 +649,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);
 }
@@ -668,6 +675,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
@@ -1994,8 +2003,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 53076f6a0a8801c3ab0a5315430930b93e55cfe3..c9c10b001fb714b77f3d30a39e4105da499d4cdc 100644 (file)
@@ -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;