remove the use of ec->desk 63/298563/1
authorSooChan Lim <sc1.lim@samsung.com>
Sun, 10 Sep 2023 04:13:25 +0000 (13:13 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Sun, 10 Sep 2023 04:13:25 +0000 (13:13 +0900)
The desk variable at e_client will be deprecated.

Change-Id: I25c2383df3c9a49b5c93d16671d2581389251619

src/e_mod_effect.c
src/e_mod_effect_rotation.c

index e66e71e..e5a56d6 100644 (file)
@@ -747,12 +747,16 @@ _eff_visibility_stack_check(E_Client *ec, Eina_List *stack)
    Eina_Rectangle r;
    Eina_Bool vis = EINA_TRUE;
    int x, y, w, h;
+   E_Desk *desk;
 
    if (!stack) return EINA_FALSE;
 
-   tiler = eina_tiler_new(ec->desk->geom.w, ec->desk->geom.h);
+   desk = e_comp_desk_find_by_ec(ec);
+   if (!desk) return EINA_FALSE;
+
+   tiler = eina_tiler_new(desk->geom.w, desk->geom.h);
    eina_tiler_tile_size_set(tiler, 1, 1);
-   EINA_RECTANGLE_SET(&r, ec->desk->geom.x, ec->desk->geom.y, ec->desk->geom.w, ec->desk->geom.h);
+   EINA_RECTANGLE_SET(&r, desk->geom.x, desk->geom.y, desk->geom.w, desk->geom.h);
    eina_tiler_rect_add(tiler, &r);
 
    EINA_LIST_FOREACH(stack, l, _ec)
index a8edda4..8e5e412 100644 (file)
@@ -163,6 +163,7 @@ _rotation_effect_targets_get(Rotation_Effect *effect, E_Desk *desk)
    Eina_List *l = NULL;
    E_Client *ec;
    E_Zone *zone;
+   E_Desk *ec_desk;
 
    if (!effect) return NULL;
 
@@ -190,7 +191,9 @@ _rotation_effect_targets_get(Rotation_Effect *effect, E_Desk *desk)
         ec = evas_object_data_get(o, "E_Client");
         if (ec)
           {
-             if (ec->desk != desk) continue;
+             ec_desk = e_comp_desk_find_by_ec(ec);
+             if (!ec_desk) continue;
+             if (ec_desk != desk) continue;
              if (e_object_is_del(E_OBJECT(ec))) continue;
              if (ec->is_cursor) continue;
              zone = e_comp_zone_find_by_ec(ec);