auto hide dock icon macos

This commit is contained in:
eYdr1en
2025-08-06 15:24:57 +02:00
parent ffdc21d15c
commit df5a7d6c19
2 changed files with 3 additions and 0 deletions

View File

@@ -199,9 +199,11 @@ class _AppState extends State<App>
switch (menuItem.key) {
case 'hide_window':
windowManager.hide();
windowManager.setSkipTaskbar(true);
break;
case 'show_window':
windowManager.show();
windowManager.setSkipTaskbar(false);
break;
case 'exit_app':
windowManager.destroy();

View File

@@ -11,6 +11,7 @@ class AppDelegate: FlutterAppDelegate {
}
override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
NSApp.setActivationPolicy(.accessory)
return false
}
}