fix gestures

This commit is contained in:
Gabor Kiss-Vamosi 2020-06-02 14:06:39 +02:00
parent 950ac3b993
commit d5a3b81737
3 changed files with 4 additions and 2 deletions

View File

@ -6,6 +6,7 @@
- `lv_ta` fix wrong cursor positon when clicked after the last character
- Change all text related indices from 16-bit to 32-bit integers throughout whole library. #1545
- Fix gestures
## v7.0.1 (01.06.2020)

View File

@ -1426,13 +1426,14 @@ static void indev_gesture(lv_indev_proc_t * proc)
lv_obj_t * gesture_obj = proc->types.pointer.act_obj;
/*If gesture parent is active check recursively the drag_parent attribute*/
/*If gesture parent is active check recursively the gesture attribute*/
while(gesture_obj && lv_obj_get_gesture_parent(gesture_obj)) {
gesture_obj = lv_obj_get_parent(gesture_obj);
}
if(gesture_obj == NULL) return;
if((LV_MATH_ABS(proc->types.pointer.vect.x) < indev_act->driver.gesture_min_velocity) &&
(LV_MATH_ABS(proc->types.pointer.vect.y) < indev_act->driver.gesture_min_velocity)) {
proc->types.pointer.gesture_sum.x = 0;

View File

@ -310,7 +310,7 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy)
new_obj->top = 0;
new_obj->protect = LV_PROTECT_NONE;
new_obj->parent_event = 0;
new_obj->gesture_parent = 1;
new_obj->gesture_parent = parent ? 1 : 0;
new_obj->state = LV_STATE_DEFAULT;
new_obj->ext_attr = NULL;