feat: disconnect Bluetooth devices, flush disks on shutdown/reboot, display progress in login.elf window

This commit is contained in:
2026-06-06 18:27:19 +02:00
parent b51ab42eb9
commit cee21738ee
24 changed files with 418 additions and 12 deletions
@@ -226,4 +226,13 @@ void open_reboot_dialog(DesktopState* ds);
void open_wordprocessor(DesktopState* ds);
void open_shutdown_dialog(DesktopState* ds);
void open_sleep_dialog(DesktopState* ds);
// Hand a graceful power-off request to login.elf and exit the desktop so the
// user returns to the login screen, where the shutdown stages run (Bluetooth
// teardown, filesystem flush) before the final ACPI power-off / reset. Pass
// Montauk::POWER_REQ_SHUTDOWN or Montauk::POWER_REQ_REBOOT.
[[noreturn]] inline void desktop_request_power(int action) {
montauk::power_request(action);
montauk::exit(0);
}
bool desktop_poll_external_windows(DesktopState* ds);