Add headless mode to desktop

This commit is contained in:
problematicconsumer
2023-07-12 23:20:06 +03:30
parent 2609f8abd6
commit c7e07f37d5
2 changed files with 14 additions and 8 deletions

View File

@@ -11,9 +11,15 @@ class WindowManagerService with WindowListener {
center: true,
);
await windowManager.waitUntilReadyToShow(windowOptions);
await windowManager.setPreventClose(true);
windowManager.addListener(this);
}
@override
Future<void> onWindowClose() async {
await windowManager.hide();
}
void dispose() {
windowManager.removeListener(this);
}