[fix] apply Windows daemon settings immediately

Add a runtime watchdog with Unicode process launch and session-end handling. Report autostart save failures and document the updated Windows behavior.

Validated with a Windows Release build, daemon and autostart integration checks, GUI crash recovery, tray exit, real logoff/login, and full reboot/login.
This commit is contained in:
dijunkun
2026-11-08 17:38:30 +08:00
parent c75394e498
commit fd6410e044
8 changed files with 388 additions and 16 deletions
@@ -4983,7 +4983,13 @@ bool GuiApplication::SaveSettingsFromUi(bool gallery_window) {
config_center_->SetForceRelay(main->get_force_relay_enabled());
main->set_force_relay_enabled(config_center_->IsForceRelay());
#if !defined(__OHOS__)
config_center_->SetAutostart(enable_autostart_);
if (config_center_->SetAutostart(enable_autostart_) != 0) {
enable_autostart_ = config_center_->IsEnableAutostart();
main->set_autostart_enabled(enable_autostart_);
main->set_settings_save_error(UiText(
localization::Literal("保存失败,请重试", localization_language_index_)));
return false;
}
#endif
if (config_center_->SetDaemon(enable_daemon_) != 0) {
enable_daemon_ = config_center_->IsEnableDaemon();