edge: use zone's width/height when determining which edge is touched down 12/323212/1
authorduna.oh <duna.oh@samsung.com>
Thu, 24 Apr 2025 07:12:53 +0000 (16:12 +0900)
committerduna.oh <duna.oh@samsung.com>
Thu, 24 Apr 2025 07:13:39 +0000 (16:13 +0900)
Change-Id: I54441798a7d7b0974ca4a276e0806dd5ad63d08c

src/e_mod_gesture_events.c

index 3fe8675c878e6680b58c2ee9fba6124d882252be..b1d756bfb9d68f156732c572c3792f8781af9611 100644 (file)
@@ -371,7 +371,7 @@ _e_gestue_send_edge_swipe_event(E_Gesture_Event_Edge_Finger_Edge *edata, int fin
 {
    E_Event_Gesture_Edge_Swipe *ev_swipe;
 
-   GTINF("Send edge_swipe gesture (fingers: %d, edge: %d) to client: %p\n", fingers, edge, edata->client);
+   GTINF("Send edge_swipe (fingers: %d, edge: %d, sx:%d, sy:%d) to %p\n", fingers, edge, x, y, edata->client);
    if (edata->client == E_GESTURE_SERVER_CLIENT)
      {
         ev_swipe = E_NEW(E_Event_Gesture_Edge_Swipe, 1);
@@ -555,6 +555,7 @@ _e_gesture_process_edge_swipe_down(Ecore_Event_Mouse_Button *ev)
    E_Gesture_Conf_Edd *conf = gesture->config->conf;
    int i;
    unsigned int idx = ev->multi.device + 1;
+   E_Zone *zone;
 
    if (!edge_swipes->base.activation.active)
      {
@@ -576,7 +577,11 @@ _e_gesture_process_edge_swipe_down(Ecore_Event_Mouse_Button *ev)
                }
           }
 
-        e_comp_size_get(&comp_w, &comp_h);
+        zone = e_comp_zone_xy_get(ev->x, ev->y);
+        if (zone)
+          e_zone_useful_geometry_get(zone, NULL, NULL, &comp_w, &comp_h);
+        else
+          e_comp_size_get(&comp_w, &comp_h);
         max_x_pos = comp_w - 1;
         max_y_pos = comp_h - 1;
         if (ev->y < conf->edge_swipe.area_offset)
@@ -595,6 +600,7 @@ _e_gesture_process_edge_swipe_down(Ecore_Event_Mouse_Button *ev)
           {
              edge_swipes->base.fingers[idx].start.x = ev->x;
              edge_swipes->base.fingers[idx].start.y = ev->y;
+             GTINF("Edge_Swipe. Touch Down on edge:%d", edge_swipes->base.edge);
              edge_swipes->start_timer = ecore_timer_add(conf->edge_swipe.time_begin, _e_gesture_timer_edge_swipe_start, NULL);
              edge_swipes->done_timer = ecore_timer_add(conf->edge_swipe.time_done, _e_gesture_timer_edge_swipe_done, NULL);
           }
@@ -722,7 +728,7 @@ _e_gesture_send_edge_drag_event(E_Gesture_Event_Edge_Finger_Edge *edata, int fin
 {
    E_Event_Gesture_Edge_Drag *ev_drag;
 
-   GTINF("Send edge drag gesture (fingers: %d, edge: %d) to client: %p\n", fingers, edge, edata->client);
+   GTINF("Send edge_drag (fingers: %d, edge: %d, cx:%d, cy:%d) to %p\n", fingers, edge, x, y, edata->client);
    if (edata->client == E_GESTURE_SERVER_CLIENT)
      {
         ev_drag = E_NEW(E_Event_Gesture_Edge_Drag, 1);
@@ -830,6 +836,7 @@ _e_gesture_process_edge_drag_down(Ecore_Event_Mouse_Button *ev)
    E_Gesture_Conf_Edd *conf = gesture->config->conf;
    int i;
    unsigned int idx = ev->multi.device + 1;
+   E_Zone *zone;
 
    if (!edge_drags->base.activation.active)
      {
@@ -852,7 +859,11 @@ _e_gesture_process_edge_drag_down(Ecore_Event_Mouse_Button *ev)
                }
           }
 
-        e_comp_size_get(&comp_w, &comp_h);
+        zone = e_zone_current_get();
+        if (zone)
+          e_zone_useful_geometry_get(zone, NULL, NULL, &comp_w, &comp_h);
+        else
+          e_comp_size_get(&comp_w, &comp_h);
         max_x_pos = comp_w - 1;
         max_y_pos = comp_h - 1;
         if (ev->y < conf->edge_drag.area_offset)
@@ -871,6 +882,7 @@ _e_gesture_process_edge_drag_down(Ecore_Event_Mouse_Button *ev)
           {
              edge_drags->base.fingers[idx].start.x = ev->x;
              edge_drags->base.fingers[idx].start.y = ev->y;
+             GTINF("Edge_Drag. Touch Down on edge:%d", edge_drags->base.edge);
              edge_drags->start_timer = ecore_timer_add(conf->edge_drag.time_begin, _e_gesture_timer_edge_drag_start, NULL);
           }
         else