Remove explicit app closing function (#618)

This commit is contained in:
Ken Van Hoeylandt
2026-08-21 08:59:52 +02:00
committed by GitHub
parent 0ff1627385
commit 4fea48f433
50 changed files with 19 additions and 89 deletions
@@ -172,10 +172,10 @@ void onPress(lv_event_t* event) {
return;
}
// Async, non-blocking - must NOT call app_manager_stop()/app_manager_finish() directly
// here: this callback runs ON the LVGL task, and app-lifecycle transitions must happen on
// this app's own thread (woken up via app_event_await() below). The result (Ok/Error) is
// reported by appMain() itself when it returns, based on ctx.calibrationApplied.
// Async, non-blocking - must NOT call app_manager_stop() directly here: this callback runs
// ON the LVGL task, and app-lifecycle transitions must happen on this app's own thread
// (woken up via app_event_await() below), which closes by returning. The result (Ok/Error)
// is reported by appMain() itself when it returns, based on ctx.calibrationApplied.
AppEvent closeEvent { .type = APP_EVENT_CLOSE, .timestamp = 0, .result = {} };
app_event_emit(ctx->appInstanceId, &closeEvent);
}
@@ -247,7 +247,6 @@ int32_t appMain(uint32_t appInstanceId, int argc, char* argv[]) {
}
switch (event.type) {
case APP_EVENT_CLOSE:
app_manager_finish(appInstanceId);
shouldClose = true;
break;
default: