From f4f0419872dabbc5c1998da2871c968a5a44ebfd Mon Sep 17 00:00:00 2001 From: Woochan Lee Date: Tue, 20 Mar 2018 21:26:15 +0900 Subject: [PATCH] elm_gesture_layer: Add new config value to handle tap finger size. The tap_finger_size value of the concept is different from the finger_size value used in the past. We need a minimum value for recognize the gesture as a tap or not. Since the actual screen has different screen sizes, there is a problem that the recognition rate of tap is lowered when using the existing value(finger_size) https://phab.enlightenment.org/D5842 Change-Id: I197f55e78ef6a1b76998ce2696858b87b2329389 --- src/lib/elm_config.c | 6 ++++++ src/lib/elm_gesture_layer.c | 5 ++++- src/lib/elm_priv.h | 4 ++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/lib/elm_config.c b/src/lib/elm_config.c index 1a66add..f807610 100644 --- a/src/lib/elm_config.c +++ b/src/lib/elm_config.c @@ -475,6 +475,9 @@ _desc_init(void) // TIZEN_ONLY(20170120): entry: Add configuration for the default value of select_allow ELM_CONFIG_VAL(D, T, entry_select_allow, T_UCHAR); // + // TIZEN_ONLY(20180321): gesture layer needs their own tap area size to handle sensitivity. + ELM_CONFIG_VAL(D, T, glayer_tap_finger_size, T_INT); + // #undef T #undef D #undef T_INT @@ -1864,6 +1867,9 @@ _config_load(void) // TIZEN_ONLY(20170120): entry: Add configuration for the default value of select_allow _elm_config->entry_select_allow = EINA_TRUE; // + // TIZEN_ONLY(20180321): gesture layer needs their own tap area size to handle sensitivity. + _elm_config->glayer_tap_finger_size = 10; + // } static void diff --git a/src/lib/elm_gesture_layer.c b/src/lib/elm_gesture_layer.c index 972fd4e..e50e0d4 100644 --- a/src/lib/elm_gesture_layer.c +++ b/src/lib/elm_gesture_layer.c @@ -1671,7 +1671,10 @@ _tap_gesture_check_finish(Gesture_Info *gesture, Evas_Coord tap_finger_size) Evas_Coord_Rectangle base; Evas_Coord_Rectangle tmp; if (!tap_finger_size) /* Use system default if not set by user */ - tap_finger_size = elm_config_finger_size_get(); + //TIZEN_ONLY(20180321): gesture layer needs their own tap area size to handle sensitivity. + //tap_finger_size = elm_config_finger_size_get(); + tap_finger_size = _elm_config->glayer_tap_finger_size; + // if (!st->l) return EINA_FALSE; EINA_LIST_FOREACH(st->l, l, pe_list) diff --git a/src/lib/elm_priv.h b/src/lib/elm_priv.h index 9a6271a..5d2266a 100644 --- a/src/lib/elm_priv.h +++ b/src/lib/elm_priv.h @@ -328,6 +328,10 @@ struct _Elm_Config unsigned char entry_select_allow; // + // TIZEN_ONLY(20180321): gesture layer needs their own tap area size to handle sensitivity. + int glayer_tap_finger_size; + // + /* Not part of the EET file */ Eina_Bool is_mirrored : 1; Eina_Bool translate : 1; -- 2.7.4