pan/pinch: fix issue not using configuration variables 86/318786/2 e_comp_rm
authorduna.oh <duna.oh@samsung.com>
Wed, 2 Oct 2024 11:49:34 +0000 (20:49 +0900)
committerduna.oh <duna.oh@samsung.com>
Tue, 8 Oct 2024 09:30:04 +0000 (18:30 +0900)
Change-Id: I053a981664b317157f15e993fae59c02a328e78d

src/e_mod_gesture_events.c

index 651d9ab5d9b7ad0cb9f58fb18d29fdae78b82b44..2544df8f3cf4e8f2db122de76328dab5d5eafde8 100644 (file)
@@ -983,7 +983,6 @@ _e_gesture_timer_pan_start(void *data)
 {
    E_Gesture_Event_Pan *pans = &gesture->gesture_events.pans;
    int num_pressed = gesture->gesture_events.num_pressed;
-   int i;
    Coords start_point = {0, };
 
    if (pans->fingers[num_pressed].client)
@@ -1023,6 +1022,7 @@ static void
 _e_gesture_process_pan_down(Ecore_Event_Mouse_Button *ev)
 {
    E_Gesture_Event_Pan *pans = &gesture->gesture_events.pans;
+   E_Gesture_Conf_Edd *conf = gesture->config->conf;
 
    if (!_e_gesture_pan_condition_check(pans))
      {
@@ -1040,7 +1040,7 @@ _e_gesture_process_pan_down(Ecore_Event_Mouse_Button *ev)
      {
         pans->state = E_GESTURE_PANPINCH_STATE_READY;
         if (pans->start_timer) ecore_timer_del(pans->start_timer);
-        pans->start_timer = ecore_timer_add(E_GESTURE_PAN_START_TIME, _e_gesture_timer_pan_start, NULL);
+        pans->start_timer = ecore_timer_add(conf->pan.time_start, _e_gesture_timer_pan_start, NULL);
      }
 }
 
@@ -1048,6 +1048,7 @@ static void
 _e_gesture_process_pan_move(Ecore_Event_Mouse_Move *ev)
 {
    E_Gesture_Event_Pan *pans = &gesture->gesture_events.pans;
+   E_Gesture_Conf_Edd *conf = gesture->config->conf;
    Coords cur_point = {0,};
    int idx, diff_x, diff_y, mode;
 
@@ -1072,7 +1073,7 @@ _e_gesture_process_pan_move(Ecore_Event_Mouse_Move *ev)
    diff_x = cur_point.x - pans->center_point.x;
    diff_y = cur_point.y - pans->center_point.y;
 
-   if ((ABS(diff_x) > E_GESTURE_PAN_MOVING_RANGE) || (ABS(diff_y) > E_GESTURE_PAN_MOVING_RANGE))
+   if ((ABS(diff_x) > conf->pan.moving_range) || (ABS(diff_y) > conf->pan.moving_range))
      {
         switch (pans->state)
           {
@@ -1088,8 +1089,8 @@ _e_gesture_process_pan_move(Ecore_Event_Mouse_Move *ev)
                 return;
           }
 
-        if (ABS(diff_x) > E_GESTURE_PAN_MOVING_RANGE) pans->center_point.x = cur_point.x;
-        if (ABS(diff_y) > E_GESTURE_PAN_MOVING_RANGE) pans->center_point.y = cur_point.y;
+        if (ABS(diff_x) > conf->pan.moving_range) pans->center_point.x = cur_point.x;
+        if (ABS(diff_y) > conf->pan.moving_range) pans->center_point.y = cur_point.y;
 
         _e_gesture_pan_send(mode, idx, cur_point.x, cur_point.y, pans->fingers[idx].res, pans->fingers[idx].client);
 
@@ -1183,6 +1184,7 @@ static void
 _e_gesture_process_pinch_down(Ecore_Event_Mouse_Button *ev)
 {
    E_Gesture_Event_Pinch *pinch = &gesture->gesture_events.pinchs;
+   E_Gesture_Conf_Edd *conf = gesture->config->conf;
 
    if (!pinch->activation.active)
      {
@@ -1199,7 +1201,7 @@ _e_gesture_process_pinch_down(Ecore_Event_Mouse_Button *ev)
      {
         pinch->state = E_GESTURE_PANPINCH_STATE_READY;
         if (pinch->start_timer) ecore_timer_del(pinch->start_timer);
-        pinch->start_timer = ecore_timer_add(E_GESTURE_PAN_START_TIME, _e_gesture_timer_pinch_start, NULL);
+        pinch->start_timer = ecore_timer_add(conf->pan.time_start, _e_gesture_timer_pinch_start, NULL);
      }
 }
 
@@ -1207,6 +1209,7 @@ static void
 _e_gesture_process_pinch_move(Ecore_Event_Mouse_Move *ev)
 {
    E_Gesture_Event_Pinch *pinch = &gesture->gesture_events.pinchs;
+   E_Gesture_Conf_Edd *conf = gesture->config->conf;
    int idx, mode, cx = 0, cy = 0;
    double current_distance = 0.0, diff = 0.0, angle = 0.0;
 
@@ -1228,7 +1231,7 @@ _e_gesture_process_pinch_move(Ecore_Event_Mouse_Move *ev)
    current_distance = _e_gesture_util_distances_get(idx);
    diff = current_distance - pinch->distance;
 
-   if (ABS(diff) > E_GESTURE_PINCH_MOVING_DISTANCE_RANGE)
+   if (ABS(diff) > conf->pinch.moving_distance_range)
      {
         pinch->distance = current_distance;
         switch (pinch->state)
@@ -1961,8 +1964,6 @@ _e_gesture_palm_cover_cancel(void)
 static void
 _e_gesture_process_palm_cover(int val)
 {
-   E_Gesture_Event_Palm_Cover *palm_covers = &gesture->gesture_events.palm_covers;
-
    if (val == 1)
      {
         if (gesture->gesture_events.recognized_gesture)