1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-28 07:03:00 +08:00

mbox: fix clicking with no buttons (#1101)

This commit is contained in:
Gabor Kiss-Vamosi 2019-06-13 05:13:34 +02:00
parent bceb46b813
commit 3abcf52ad7

View File

@ -448,10 +448,11 @@ static lv_res_t lv_mbox_signal(lv_obj_t * mbox, lv_signal_t sign, void * param)
}
} else if(sign == LV_SIGNAL_STYLE_CHG) {
mbox_realign(mbox);
} else if(sign == LV_SIGNAL_RELEASED) {
uint16_t btn_id = lv_btnm_get_active_btn(ext->btnm);
if(btn_id != LV_BTNM_BTN_NONE) lv_event_send(mbox, LV_EVENT_SELECTED, &btn_id);
if(ext->btnm) {
uint16_t btn_id = lv_btnm_get_active_btn(ext->btnm);
if(btn_id != LV_BTNM_BTN_NONE) lv_event_send(mbox, LV_EVENT_SELECTED, &btn_id);
}
} else if(sign == LV_SIGNAL_FOCUS || sign == LV_SIGNAL_DEFOCUS || sign == LV_SIGNAL_CONTROL ||
sign == LV_SIGNAL_GET_EDITABLE) {
if(ext->btnm) {