summaryrefslogtreecommitdiff
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
parentfcb48ef4022a49b147ad4daf4bb1f958d039b07a (diff)
efl/gesture: add fallback for glayer_tap_finger_size not being found
just in case Differential Revision: https://phab.enlightenment.org/D11494
-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 *
139_efl_canvas_gesture_manager_efl_object_constructor(Eo *obj, Efl_Canvas_Gesture_Manager_Data *pd) 139_efl_canvas_gesture_manager_efl_object_constructor(Eo *obj, Efl_Canvas_Gesture_Manager_Data *pd)
140{ 140{
141 Eo *config; 141 Eo *config;
142 int finger_size = 0;
142 obj = efl_constructor(efl_super(obj, MY_CLASS)); 143 obj = efl_constructor(efl_super(obj, MY_CLASS));
143 144
144 pd->m_recognizers = eina_hash_pointer_new(EINA_FREE_CB(_hash_unref_cb)); 145 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
160 efl_gesture_manager_recognizer_register(obj, efl_add(EFL_CANVAS_GESTURE_RECOGNIZER_FLICK_CLASS, obj)); 161 efl_gesture_manager_recognizer_register(obj, efl_add(EFL_CANVAS_GESTURE_RECOGNIZER_FLICK_CLASS, obj));
161 efl_gesture_manager_recognizer_register(obj, efl_add(EFL_CANVAS_GESTURE_RECOGNIZER_ROTATE_CLASS, obj)); 162 efl_gesture_manager_recognizer_register(obj, efl_add(EFL_CANVAS_GESTURE_RECOGNIZER_ROTATE_CLASS, obj));
162 efl_gesture_manager_recognizer_register(obj, efl_add(EFL_CANVAS_GESTURE_RECOGNIZER_ZOOM_CLASS, obj)); 163 efl_gesture_manager_recognizer_register(obj, efl_add(EFL_CANVAS_GESTURE_RECOGNIZER_ZOOM_CLASS, obj));
163 _update_finger_sizes(pd, efl_config_int_get(config, "glayer_tap_finger_size")); 164 /* realistically this will never fail, but the whole gesture layer breaks if this is 0 */
165 finger_size = efl_config_int_get(config, "glayer_tap_finger_size");
166 if (!getenv("EFL_RUN_IN_TREE"))
167 finger_size = efl_config_int_get(config, "glayer_tap_finger_size");
168 if (finger_size < 1) finger_size = 10;
169 _update_finger_sizes(pd, finger_size);
164 170
165 return obj; 171 return obj;
166} 172}