diff --git a/gui/lib/main.dart b/gui/lib/main.dart index 6dfd16b..e093a1e 100644 --- a/gui/lib/main.dart +++ b/gui/lib/main.dart @@ -171,6 +171,7 @@ Future _initWindow() async { }else { await windowManager.setAlignment(Alignment.center); } + await windowManager.setPreventClose(true); if(isWin11) { await Window.setEffect( diff --git a/gui/lib/src/page/implementation/home_page.dart b/gui/lib/src/page/implementation/home_page.dart index b518512..cc0a512 100644 --- a/gui/lib/src/page/implementation/home_page.dart +++ b/gui/lib/src/page/implementation/home_page.dart @@ -164,6 +164,9 @@ class _HomePageState extends State with WindowListener, AutomaticKeepA await _hostingController.discardServer(); }catch(error) { log("[HOSTING] Cannot discard server: $error"); + }finally { + // Force closing because the backend might be running, but we want the process to exit + exit(0); } } diff --git a/gui/pubspec.yaml b/gui/pubspec.yaml index 1356964..fd5aca1 100644 --- a/gui/pubspec.yaml +++ b/gui/pubspec.yaml @@ -1,6 +1,6 @@ name: reboot_launcher description: Graphical User Interface for Project Reboot -version: "10.0.0" +version: "10.0.1" publish_to: 'none'