1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-14 06:42:58 +08:00

fix(btnmatrix): tapping just outside a button in a button matrix can cause the last tapped button to repeat. (#3487)

This commit is contained in:
martaaay 2022-07-15 02:03:05 -04:00 committed by GitHub
parent 67d6661839
commit 11602976e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -422,6 +422,7 @@ static void lv_btnmatrix_event(const lv_obj_class_t * class_p, lv_event_t * e)
lv_indev_get_point(param, &p);
btn_pr = get_button_from_point(obj, &p);
/*Handle the case where there is no button there*/
btnm->btn_id_sel = LV_BTNMATRIX_BTN_NONE;
if(btn_pr != LV_BTNMATRIX_BTN_NONE) {
if(button_is_inactive(btnm->ctrl_bits[btn_pr]) == false &&
button_is_hidden(btnm->ctrl_bits[btn_pr]) == false) {