[1 finger tap and hold] should use highlighted object information. 41/98341/1
authorShinwoo Kim <cinoo.kim@samsung.com>
Mon, 14 Nov 2016 11:30:10 +0000 (20:30 +0900)
committerJaeun Choi <jaeun12.choi@samsung.com>
Thu, 17 Nov 2016 06:14:36 +0000 (15:14 +0900)
- In case of rotated device, the coordinate should be changed properly.
- If 1 finger tap is aborted, the highlighted object information comes from screen reader AT-client.
  We need almost 1 sec between the tap timeout and the hover timeout. (heuristic value)

Change-Id: I080fbc521d763ff56a29c90e635222923e94a43d

src/e_screen_reader_config.c
src/e_screen_reader_gestures.c

index d4611f9..9430773 100644 (file)
@@ -14,9 +14,9 @@ _e_mod_config_new(void)
 
    _e_mod_config->one_finger_flick_min_length = 100;
    _e_mod_config->one_finger_flick_max_time = 400;
-   _e_mod_config->one_finger_hover_longpress_timeout = 0.41;
+   _e_mod_config->one_finger_hover_longpress_timeout = 0.4;
    _e_mod_config->two_fingers_hover_longpress_timeout = 0.1;
-   _e_mod_config->one_finger_tap_timeout = 0.4;
+   _e_mod_config->one_finger_tap_timeout = 0.3;
    _e_mod_config->one_finger_tap_radius = 100;
    _e_mod_config->two_finger_flick_to_scroll_timeout = 100;
    _e_mod_config->two_finger_flick_to_scroll_min_length = 50;
index 4206ca6..e791eda 100644 (file)
@@ -713,6 +713,7 @@ static void
 _hover_gesture_timer_reset(Cover *cov, double time)
 {
    DEBUG("Hover timer reset");
+
    cov->hover_gesture.longpressed = EINA_FALSE;
    if (cov->hover_gesture.timer)
      {
@@ -831,6 +832,25 @@ _hover_gesture_mouse_up(Ecore_Event_Mouse_Button *ev, Cover *cov)
      cov->hover_gesture.state = GESTURE_NOT_STARTED;
 }
 
+void __inverse_transform_coordinates(int *ax, int *ay, int win_angle)
+{
+   int w, h, tmp;
+
+   ecore_wl_screen_size_get(&w, &h);
+   switch (win_angle) {
+      case 90:
+         tmp = *ax;
+         *ax = *ay;
+         *ay = h - tmp;
+         break;
+      case 270:
+         tmp = *ax;
+         *ax = w - *ay;
+         *ay = tmp;
+         break;
+   }
+}
+
 static void
 _hover_event_emit(Cover *cov, gesture_state_e state)
 {
@@ -838,6 +858,7 @@ _hover_event_emit(Cover *cov, gesture_state_e state)
      {
         if (highlighted_object_x != -1 && highlighted_object_y != -1)
           {
+             __inverse_transform_coordinates(&highlighted_object_x, &highlighted_object_y, cov->angle);
              cov->tap_n_hold_gesture_data.ev_down->x = highlighted_object_x;
              cov->tap_n_hold_gesture_data.ev_down->y = highlighted_object_y;
              cov->tap_n_hold_gesture_data.ev_down->root.x = highlighted_object_x;