From: Shinwoo Kim Date: Mon, 14 Nov 2016 11:30:10 +0000 (+0900) Subject: [1 finger tap and hold] should use highlighted object information. X-Git-Tag: accepted/tizen/3.0/common/20161117.090418^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cb8d59a26e6306a46e2469b69e9723e8d849a4e7;p=platform%2Fcore%2Fuifw%2Fe-mod-tizen-screen-reader.git [1 finger tap and hold] should use highlighted object information. - 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 --- diff --git a/src/e_screen_reader_config.c b/src/e_screen_reader_config.c index d4611f9..9430773 100644 --- a/src/e_screen_reader_config.c +++ b/src/e_screen_reader_config.c @@ -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; diff --git a/src/e_screen_reader_gestures.c b/src/e_screen_reader_gestures.c index 4206ca6..e791eda 100644 --- a/src/e_screen_reader_gestures.c +++ b/src/e_screen_reader_gestures.c @@ -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;