mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-28 07:03:00 +08:00
fix(indev) focus on objects on release instead of press
Previously if the obejct were pressed and scrolled the parent by scroll chaining focus event were sent. If the focusing is moved to the release phase we can detect if there were scroll.
This commit is contained in:
parent
7f367d6956
commit
76a8293375
@ -839,11 +839,6 @@ static void indev_proc_press(_lv_indev_proc_t * proc)
|
||||
if(indev_reset_check(proc)) return;
|
||||
|
||||
if(indev_act->proc.wait_until_release) return;
|
||||
|
||||
/*Handle focus*/
|
||||
indev_click_focus(&indev_act->proc);
|
||||
if(indev_reset_check(proc)) return;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -923,6 +918,11 @@ static void indev_proc_release(_lv_indev_proc_t * proc)
|
||||
|
||||
/*Send CLICK if no scrolling*/
|
||||
if(scroll_obj == NULL) {
|
||||
|
||||
/*Handle focus*/
|
||||
indev_click_focus(&indev_act->proc);
|
||||
if(indev_reset_check(proc)) return;
|
||||
|
||||
if(proc->long_pr_sent == 0) {
|
||||
lv_event_send(indev_obj_act, LV_EVENT_SHORT_CLICKED, indev_act);
|
||||
if(indev_reset_check(proc)) return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user