e_zone: remove the flip variable and e_zone_flip_coords_handle 11/295511/2
authorSooChan Lim <sc1.lim@samsung.com>
Sun, 9 Jul 2023 03:28:35 +0000 (12:28 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Mon, 10 Jul 2023 06:31:59 +0000 (06:31 +0000)
The flip at e_zone is not used anymore.

Change-Id: I72ca21b7bb913139c3bba479c8c70ae50438f7fe

src/bin/e_client.c
src/bin/e_dnd.c
src/bin/e_zone.c
src/bin/e_zone.h

index 5aab25e..77b9327 100644 (file)
@@ -4881,8 +4881,6 @@ e_client_mouse_move(E_Client *ec, Evas_Point *output)
    if (e_client_util_moving_get(ec))
      {
         _e_client_move_handle(ec);
-
-        if (ec->zone) e_zone_flip_coords_handle(ec->zone, output->x, output->y);
      }
    else if (e_client_util_resizing_get(ec))
      {
@@ -6613,7 +6611,6 @@ e_client_act_move_end(E_Client *ec, E_Binding_Event_Mouse_Button *ev EINA_UNUSED
    if (!ec->moving) return;
    e_zone_edge_enable();
    _e_client_move_end(ec);
-   e_zone_flip_coords_handle(ec->zone, -1, -1);
    _e_client_action_finish();
 }
 
@@ -6870,7 +6867,6 @@ e_client_signal_move_end(E_Client *ec, const char *sig EINA_UNUSED, const char *
    if (!ec->moving) return;
    _e_client_move_end(ec);
    e_zone_edge_enable();
-   e_zone_flip_coords_handle(ec->zone, -1, -1);
 }
 
 EINTERN void
index d5e805d..26b9234 100644 (file)
@@ -499,7 +499,6 @@ _e_drag_win_matches(E_Drop_Handler *h, Ecore_Window win)
 static void
 _e_drag_end(int x, int y)
 {
-   E_Zone *zone;
    const Eina_List *l;
    E_Event_Dnd_Drop ev;
    int dx, dy;
@@ -509,9 +508,6 @@ _e_drag_end(int x, int y)
 
    if (!_drag_current) return;
    win = e_comp_top_window_at_xy_get(x, y);
-   zone = e_comp_zone_xy_get(x, y);
-   /* Pass -1, -1, so that it is possible to drop at the edge. */
-   if (zone) e_zone_flip_coords_handle(zone, -1, -1);
 
    evas_object_hide(_drag_current->comp_object);
 
index 62f8c45..211d362 100644 (file)
@@ -45,11 +45,6 @@ E_API int E_EVENT_ZONE_ROTATION_EFFECT_DONE = 0;
 EINTERN int E_EVENT_ZONE_DISPLAY_STATE_CHANGE = 0;
 EINTERN int E_EVENT_ZONE_USEFUL_GEOMETRY_CHANGE = 0;
 
-#define E_ZONE_FLIP_LEFT(zone)  (((((zone)->desk_x_count > 1)) || ((zone)->desk_x_current > 0)) && (zone)->edge.left)
-#define E_ZONE_FLIP_RIGHT(zone) (((((zone)->desk_x_count > 1)) || (((zone)->desk_x_current + 1) < (zone)->desk_x_count)) && (zone)->edge.right)
-#define E_ZONE_FLIP_UP(zone)    (((((zone)->desk_y_count > 1)) || ((zone)->desk_y_current > 0)) && (zone)->edge.top)
-#define E_ZONE_FLIP_DOWN(zone)  (((((zone)->desk_y_count > 1)) || (((zone)->desk_y_current + 1) < (zone)->desk_y_count)) && (zone)->edge.bottom)
-
 #define E_ZONE_CORNER_RATIO 0.025;
 
 static int _e_zone_hooks_delete = 0;
@@ -541,83 +536,6 @@ e_zone_bg_reconfigure(E_Zone *zone)
 }
 
 EINTERN void
-e_zone_flip_coords_handle(E_Zone *zone,
-                          int x,
-                          int y)
-{
-   E_OBJECT_CHECK(zone);
-   E_OBJECT_TYPE_CHECK(zone, E_ZONE_TYPE);
-
-   if (zone->flip.switching)
-     {
-        int cx, cy, w, h;
-
-        switch (zone->flip.switching)
-          {
-           case E_ZONE_EDGE_LEFT:
-             evas_object_geometry_get(zone->edge.left, &cx, &cy, &w, &h);
-             if (!E_INSIDE(x, y, cx, cy, w, h))
-               zone->flip.switching = E_ZONE_EDGE_NONE;
-             break;
-           case E_ZONE_EDGE_RIGHT:
-             evas_object_geometry_get(zone->edge.right, &cx, &cy, &w, &h);
-             if (!E_INSIDE(x, y, cx, cy, w, h))
-               zone->flip.switching = E_ZONE_EDGE_NONE;
-             break;
-           case E_ZONE_EDGE_TOP:
-             evas_object_geometry_get(zone->edge.top, &cx, &cy, &w, &h);
-             if (!E_INSIDE(x, y, cx, cy, w, h))
-               zone->flip.switching = E_ZONE_EDGE_NONE;
-             break;
-           case E_ZONE_EDGE_BOTTOM:
-             evas_object_geometry_get(zone->edge.bottom, &cx, &cy, &w, &h);
-             if (!E_INSIDE(x, y, cx, cy, w, h))
-               zone->flip.switching = E_ZONE_EDGE_NONE;
-             break;
-
-           case E_ZONE_EDGE_TOP_LEFT:
-             evas_object_geometry_get(zone->corner.left_top, &cx, &cy, &w, &h);
-             if (!E_INSIDE(x, y, cx, cy, w, h))
-               {
-                  evas_object_geometry_get(zone->corner.top_left, &cx, &cy, &w, &h);
-                  if (!E_INSIDE(x, y, cx, cy, w, h))
-                    zone->flip.switching = E_ZONE_EDGE_NONE;
-               }
-             break;
-           case E_ZONE_EDGE_TOP_RIGHT:
-             evas_object_geometry_get(zone->corner.right_top, &cx, &cy, &w, &h);
-             if (!E_INSIDE(x, y, cx, cy, w, h))
-               {
-                  evas_object_geometry_get(zone->corner.top_right, &cx, &cy, &w, &h);
-                  if (!E_INSIDE(x, y, cx, cy, w, h))
-                    zone->flip.switching = E_ZONE_EDGE_NONE;
-               }
-             break;
-           case E_ZONE_EDGE_BOTTOM_RIGHT:
-             evas_object_geometry_get(zone->corner.right_bottom, &cx, &cy, &w, &h);
-             if (!E_INSIDE(x, y, cx, cy, w, h))
-               {
-                  evas_object_geometry_get(zone->corner.bottom_right, &cx, &cy, &w, &h);
-                  if (!E_INSIDE(x, y, cx, cy, w, h))
-                    zone->flip.switching = E_ZONE_EDGE_NONE;
-               }
-             break;
-           case E_ZONE_EDGE_BOTTOM_LEFT:
-             evas_object_geometry_get(zone->corner.left_bottom, &cx, &cy, &w, &h);
-             if (!E_INSIDE(x, y, cx, cy, w, h))
-               {
-                  evas_object_geometry_get(zone->corner.bottom_left, &cx, &cy, &w, &h);
-                  if (!E_INSIDE(x, y, cx, cy, w, h))
-                    zone->flip.switching = E_ZONE_EDGE_NONE;
-               }
-             break;
-             default: break;
-          }
-        if (zone->flip.switching) return;
-     }
-}
-
-EINTERN void
 e_zone_desk_count_set(E_Zone *zone,
                       int x_count,
                       int y_count)
@@ -843,7 +761,6 @@ e_zone_edge_disable(void)
 
    EINA_LIST_FOREACH(e_comp->zones, l, zone)
      {
-        zone->flip.switching = E_ZONE_EDGE_NONE;
         if (zone->edge.left) evas_object_hide(zone->edge.left);
         if (zone->edge.right) evas_object_hide(zone->edge.right);
         if (zone->edge.top) evas_object_hide(zone->edge.top);
@@ -1088,8 +1005,6 @@ e_zone_edge_free(E_Zone_Edge edge)
    if (edge == E_ZONE_EDGE_NONE) return;
    EINA_LIST_FOREACH(e_comp->zones, l, zone)
      {
-        if (zone->flip.switching == edge)
-          zone->flip.switching = E_ZONE_EDGE_NONE;
         switch (edge)
           {
            case E_ZONE_EDGE_LEFT:
index e2c5e1e..bfff954 100644 (file)
@@ -105,14 +105,6 @@ struct _E_Zone
 
    struct
    {
-      E_Zone_Edge        switching;
-      //E_Shelf           *es;
-      E_Event_Zone_Edge *ev;
-      E_Binding_Edge    *bind;
-   } flip;
-
-   struct
-   {
       Evas_Object *top, *right, *bottom, *left;
    } edge;
    struct
@@ -235,7 +227,6 @@ E_API E_Zone   *e_zone_current_get(void);
 EINTERN E_Zone *e_zone_get_by_id(int id);
 EINTERN E_Zone *e_zone_get_by_position(int x, int y);
 EINTERN void      e_zone_bg_reconfigure(E_Zone *zone);
-EINTERN void      e_zone_flip_coords_handle(E_Zone *zone, int x, int y);
 EINTERN void      e_zone_desk_count_set(E_Zone *zone, int x_count, int y_count);
 EINTERN void      e_zone_desk_count_get(E_Zone *zone, int *x_count, int *y_count);
 EINTERN void      e_zone_desk_flip_by(E_Zone *zone, int dx, int dy);