summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2020-03-12 09:11:53 -0400
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2020-03-12 18:05:02 +0100
commit35727d29c37a9cb4a60b83475ced265fdb92e0a9 (patch)
tree069bdbbf46a88a1c517a0426c58abdf13f5f7c4f /src
parentfcb48ef4022a49b147ad4daf4bb1f958d039b07a (diff)
downloadefl-35727d29c37a9cb4a60b83475ced265fdb92e0a9.tar.gz
efl/gesture: add fallback for glayer_tap_finger_size not being found
just in case Differential Revision: https://phab.enlightenment.org/D11494
Diffstat (limited to 'src')
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_manager.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/evas/gesture/efl_canvas_gesture_manager.c b/src/lib/evas/gesture/efl_canvas_gesture_manager.c
index 48f515471c..29745843bb 100644
--- a/src/lib/evas/gesture/efl_canvas_gesture_manager.c
+++ b/src/lib/evas/gesture/efl_canvas_gesture_manager.c
@@ -139,6 +139,7 @@ EOLIAN static Efl_Object *
_efl_canvas_gesture_manager_efl_object_constructor(Eo *obj, Efl_Canvas_Gesture_Manager_Data *pd)
{
Eo *config;
+ int finger_size = 0;
obj = efl_constructor(efl_super(obj, MY_CLASS));
pd->m_recognizers = eina_hash_pointer_new(EINA_FREE_CB(_hash_unref_cb));
@@ -160,7 +161,12 @@ _efl_canvas_gesture_manager_efl_object_constructor(Eo *obj, Efl_Canvas_Gesture_M
efl_gesture_manager_recognizer_register(obj, efl_add(EFL_CANVAS_GESTURE_RECOGNIZER_FLICK_CLASS, obj));
efl_gesture_manager_recognizer_register(obj, efl_add(EFL_CANVAS_GESTURE_RECOGNIZER_ROTATE_CLASS, obj));
efl_gesture_manager_recognizer_register(obj, efl_add(EFL_CANVAS_GESTURE_RECOGNIZER_ZOOM_CLASS, obj));
- _update_finger_sizes(pd, efl_config_int_get(config, "glayer_tap_finger_size"));
+ /* realistically this will never fail, but the whole gesture layer breaks if this is 0 */
+ finger_size = efl_config_int_get(config, "glayer_tap_finger_size");
+ if (!getenv("EFL_RUN_IN_TREE"))
+ finger_size = efl_config_int_get(config, "glayer_tap_finger_size");
+ if (finger_size < 1) finger_size = 10;
+ _update_finger_sizes(pd, finger_size);
return obj;
}