Skip to content
Snippets Groups Projects
Commit b226eb18 authored by Johannes Marbach's avatar Johannes Marbach
Browse files

Fix shutdown message box not closing on decline

parent 5320429f
No related branches found
No related tags found
No related merge requests found
......@@ -15,6 +15,7 @@ If a change only affects particular applications, they are listed in parentheses
- feat(buffyboard): Add fbdev force-refresh quirk via config
- feat(buffyboard): Allow disabling input devices via config
- feat(buffyboard): Add CLI flags for overriding geometry & DPI
- fix(unl0kr): Shutdown message box doesn't close on decline
- misc: Update lvgl to git master (2023-03-30)
## 3.0.0 (2024-03-22)
......
......@@ -296,8 +296,18 @@ static void shutdown_mbox_confirmed_cb(lv_event_t *event) {
}
static void shutdown_mbox_declined_cb(lv_event_t *event) {
lv_obj_t *mbox = lv_event_get_target(event);
lv_msgbox_close(mbox);
// Find the containing message box for the clicked button
lv_obj_t *obj = lv_event_get_target(event);
while (obj && !lv_obj_check_type(obj, &lv_msgbox_class)) {
obj = lv_obj_get_parent(obj);
}
if (!obj) {
bbx_log(BBX_LOG_LEVEL_ERROR, "Could not find containing message box for clicked button");
return;
}
lv_msgbox_close(obj);
}
static void keyboard_value_changed_cb(lv_event_t *event) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment