diff --git a/frontend/appflowy_flutter/lib/startup/tasks/windows.dart b/frontend/appflowy_flutter/lib/startup/tasks/windows.dart index 4d7bd47a33..78486e3320 100644 --- a/frontend/appflowy_flutter/lib/startup/tasks/windows.dart +++ b/frontend/appflowy_flutter/lib/startup/tasks/windows.dart @@ -64,11 +64,6 @@ class InitAppWindowTask extends LaunchTask with WindowListener { await windowManager.show(); await windowManager.focus(); - if (PlatformExtension.isWindows) { - // Hide title bar on Windows, we implement a custom solution elsewhere - await windowManager.setTitleBarStyle(TitleBarStyle.hidden); - } - if (position != null) { await windowManager.setPosition(position); } diff --git a/frontend/appflowy_flutter/macos/Runner/AppDelegate.swift b/frontend/appflowy_flutter/macos/Runner/AppDelegate.swift index d53ef64377..cad0330b85 100644 --- a/frontend/appflowy_flutter/macos/Runner/AppDelegate.swift +++ b/frontend/appflowy_flutter/macos/Runner/AppDelegate.swift @@ -4,6 +4,16 @@ import FlutterMacOS @NSApplicationMain class AppDelegate: FlutterAppDelegate { override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { + return false + } + + override func applicationShouldHandleReopen(_ sender: NSApplication, hasVisibleWindows flag: Bool) -> Bool { + if !flag { + for window in sender.windows { + window.makeKeyAndOrderFront(self) + } + } + return true } } diff --git a/frontend/appflowy_flutter/pubspec.yaml b/frontend/appflowy_flutter/pubspec.yaml index 6276425e78..67241c3ec0 100644 --- a/frontend/appflowy_flutter/pubspec.yaml +++ b/frontend/appflowy_flutter/pubspec.yaml @@ -147,6 +147,7 @@ dependencies: # BitsDojo Window for Windows bitsdojo_window: ^0.1.6 + flutter_highlight: ^0.7.0 dev_dependencies: