Revert "Revert "rotation: Packing effect objects to the desk's smart object."" 35/104335/2 accepted/tizen_3.0.m2_mobile accepted/tizen_3.0.m2_tv accepted/tizen_3.0.m2_wearable tizen_3.0.m2 accepted/tizen/3.0.m2/mobile/20170104.141614 accepted/tizen/3.0.m2/tv/20170104.142058 accepted/tizen/3.0.m2/wearable/20170104.142350 accepted/tizen/3.0/common/20161215.165110 accepted/tizen/3.0/ivi/20161215.050459 accepted/tizen/3.0/mobile/20161215.050325 accepted/tizen/3.0/tv/20161215.050356 accepted/tizen/3.0/wearable/20161215.050428 accepted/tizen/common/20161213.164918 accepted/tizen/ivi/20161214.015816 accepted/tizen/mobile/20161214.015648 accepted/tizen/tv/20161214.015723 accepted/tizen/wearable/20161214.015747 submit/tizen/20161213.120013 submit/tizen_3.0.m2/20170104.093751 submit/tizen_3.0/20161213.120123 submit/tizen_3.0/20161214.220444
authorSeunghun Lee <shiin.lee@samsung.com>
Tue, 13 Dec 2016 04:47:59 +0000 (13:47 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Tue, 13 Dec 2016 11:19:09 +0000 (03:19 -0800)
This reverts commit 1fef418d4acc3a75501101b8a111cce6af371aa9.

Change-Id: I4737e998a528ef25a95935a31ea21207394a6d17

src/e_mod_effect_rotation.c

index b3bd57b..12c5056 100644 (file)
@@ -145,7 +145,7 @@ no_hint:
 }
 
 static Eina_List *
-_rotation_effect_targets_get(Rotation_Effect *effect)
+_rotation_effect_targets_get(Rotation_Effect *effect, E_Desk *desk)
 {
    Evas_Object *o;
    Eina_Tiler *t;
@@ -181,6 +181,7 @@ _rotation_effect_targets_get(Rotation_Effect *effect)
         ec = evas_object_data_get(o, "E_Client");
         if (ec)
           {
+             if (ec->desk != desk) continue;
              if (e_object_is_del(E_OBJECT(ec))) continue;
              if (!E_INTERSECTS(ec->x, ec->y, ec->w, ec->h, ec->zone->x, ec->zone->y, ec->zone->w, ec->zone->h))
                continue;
@@ -402,7 +403,7 @@ fail:
 }
 
 static Rotation_Effect_Begin_Context *
-_rotation_effect_begin_create(Rotation_Effect *effect, Eina_List *targets)
+_rotation_effect_begin_create(Rotation_Effect *effect, Eina_List *targets, E_Desk *desk)
 {
    Rotation_Effect_Begin_Context *ctx_begin = NULL;
    Rotation_Effect_Object *eobj = NULL;
@@ -446,6 +447,8 @@ _rotation_effect_begin_create(Rotation_Effect *effect, Eina_List *targets)
         return NULL;
      }
 
+   e_desk_smart_member_add(desk, ctx_begin->layout);
+
    EFFINF("Rotation Begin Created", NULL, NULL);
 
    int diff = effect->zone->rot.prev - effect->zone->rot.curr;
@@ -459,7 +462,7 @@ _rotation_effect_begin_create(Rotation_Effect *effect, Eina_List *targets)
 
 
 static Rotation_Effect_End_Context *
-_rotation_effect_end_create(Rotation_Effect *effect, Eina_List *targets)
+_rotation_effect_end_create(Rotation_Effect *effect, Eina_List *targets, E_Desk *desk)
 {
    Rotation_Effect_End_Context *ctx_end = NULL;
    Rotation_Effect_Object *eobj = NULL;
@@ -501,6 +504,8 @@ _rotation_effect_end_create(Rotation_Effect *effect, Eina_List *targets)
         return NULL;
      }
 
+   e_desk_smart_member_add(desk, ctx_end->layout);
+
    EFFINF("Rotation End Created", NULL, NULL);
 
    int diff = _rotation_zone->curr_angle - _rotation_zone->prev_angle;
@@ -688,16 +693,16 @@ _rotation_effect_start(Rotation_Effect *effect)
 }
 
 static void
-_rotation_effect_animator_begin_prepare(Rotation_Effect *effect)
+_rotation_effect_animator_begin_prepare(Rotation_Effect *effect, E_Desk *desk)
 {
    if (!effect) return;
 
    _rotation_effect_clear(effect);
 
-   effect->targets = _rotation_effect_targets_get(effect);
+   effect->targets = _rotation_effect_targets_get(effect, desk);
    if (!effect->targets) return;
 
-   effect->ctx_begin = _rotation_effect_begin_create(effect, effect->targets);
+   effect->ctx_begin = _rotation_effect_begin_create(effect, effect->targets, desk);
    if (!effect->ctx_begin)
      {
         _rotation_effect_clear(effect);
@@ -711,7 +716,7 @@ _rotation_effect_animator_begin_prepare(Rotation_Effect *effect)
 }
 
 static void
-_rotation_effect_animator_end_prepare(Rotation_Effect *effect)
+_rotation_effect_animator_end_prepare(Rotation_Effect *effect, E_Desk *desk)
 {
    if (!effect) return;
    if (!effect->targets) return;
@@ -722,7 +727,7 @@ _rotation_effect_animator_end_prepare(Rotation_Effect *effect)
      _rotation_effect_animator_end_context_free(effect->ctx_end);
    effect->ctx_end = NULL;
 
-   effect->ctx_end = _rotation_effect_end_create(effect, effect->targets);
+   effect->ctx_end = _rotation_effect_end_create(effect, effect->targets, desk);
    if (!effect->ctx_end) return;
 
    EFFINF("Rotation End Prepared", NULL, NULL);
@@ -736,6 +741,7 @@ _rotation_effect_cb_zone_rotation_begin(void *data, int type, void *event)
    Rotation_Effect *effect;
    E_Event_Zone_Rotation_Change_Begin *ev = event;
    E_Zone *zone;
+   E_Desk *desk;
 
    effect = (Rotation_Effect *)data;
    if (!effect) return ECORE_CALLBACK_PASS_ON;
@@ -752,7 +758,8 @@ _rotation_effect_cb_zone_rotation_begin(void *data, int type, void *event)
    _rotation_zone->curr_angle = zone->rot.curr;
    _rotation_zone->prev_angle = zone->rot.prev;
 
-   _rotation_effect_animator_begin_prepare(effect);
+   desk = e_desk_current_get(zone);
+   _rotation_effect_animator_begin_prepare(effect, desk);
 
    if (effect->targets)
      _rotation_effect_ready_send(zone);
@@ -766,6 +773,7 @@ _rotation_effect_cb_zone_rotation_end(void *data, int type, void *event)
    Rotation_Effect *effect;
    E_Event_Zone_Rotation_Change_End *ev = event;
    E_Zone *zone;
+   E_Desk *desk;
 
    effect = (Rotation_Effect *)data;
    if (!effect) return ECORE_CALLBACK_PASS_ON;
@@ -785,7 +793,8 @@ _rotation_effect_cb_zone_rotation_end(void *data, int type, void *event)
 
    if (!effect->ctx_end)
      {
-        _rotation_effect_animator_end_prepare(effect);
+        desk = e_desk_current_get(zone);
+        _rotation_effect_animator_end_prepare(effect, desk);
 
         if (!effect->ctx_end)
           _rotation_effect_clear(effect);
@@ -822,6 +831,7 @@ _rotation_effect_cb_buffer_change(void *data, int ev_type, void *event)
 {
    E_Event_Client *ev = event;
    E_Client *ec;
+   E_Desk *desk;
    Rotation_Effect *effect;
 
    ec = ev->ec;
@@ -837,7 +847,11 @@ _rotation_effect_cb_buffer_change(void *data, int ev_type, void *event)
 
    if (!effect->wait_for_buffer) return ECORE_CALLBACK_PASS_ON;
 
-   if (!effect->ctx_end) _rotation_effect_animator_end_prepare(effect);
+   if (!effect->ctx_end)
+     {
+        desk = e_desk_current_get(ec->zone);
+        _rotation_effect_animator_end_prepare(effect, desk);
+     }
    if (effect->ctx_end) _rotation_effect_start(effect);
 
    return ECORE_CALLBACK_PASS_ON;