elm_gesture_layer: Add new config value to handle tap finger size. 26/173326/2
authorWoochan Lee <wc0917.lee@samsung.com>
Tue, 20 Mar 2018 12:26:15 +0000 (21:26 +0900)
committerWoochan Lee <wc0917.lee@samsung.com>
Wed, 21 Mar 2018 01:19:41 +0000 (10:19 +0900)
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
src/lib/elm_gesture_layer.c
src/lib/elm_priv.h

index 30cda1b..7969547 100644 (file)
@@ -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
index 972fd4e..e50e0d4 100644 (file)
@@ -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)
index 9a6271a..5d2266a 100644 (file)
@@ -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;