Skip to content

Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.

fix: windows frameless issue (#7813)

Lucas4e78b994b576
diff --git a/frontend/appflowy_flutter/lib/startup/tasks/windows.dart b/frontend/appflowy_flutter/lib/startup/tasks/windows.dart
index 094d361bbb..b68b20acec 100644
--- a/frontend/appflowy_flutter/lib/startup/tasks/windows.dart
+++ b/frontend/appflowy_flutter/lib/startup/tasks/windows.dart
@@ -46,6 +46,8 @@ class InitAppWindowTask extends LaunchTask with WindowListener {
final position = await windowSizeManager.getPosition();
if (UniversalPlatform.isWindows) {
+ await windowManager.setTitleBarStyle(TitleBarStyle.hidden);
+
doWhenWindowReady(() async {
appWindow.minSize = windowOptions.minimumSize;
appWindow.maxSize = windowOptions.maximumSize;
@@ -55,8 +57,6 @@ class InitAppWindowTask extends LaunchTask with WindowListener {
appWindow.position = position;
}
- appWindow.show();
-
/// on Windows we maximize the window if it was previously closed
/// from a maximized state.
final isMaximized = await windowSizeManager.getWindowMaximized();
diff --git a/frontend/appflowy_flutter/windows/runner/main.cpp b/frontend/appflowy_flutter/windows/runner/main.cpp
index b1fff72b84..d825d5c246 100644
--- a/frontend/appflowy_flutter/windows/runner/main.cpp
+++ b/frontend/appflowy_flutter/windows/runner/main.cpp
@@ -5,8 +5,8 @@
#include "flutter_window.h"
#include "utils.h"
-#include <bitsdojo_window_windows/bitsdojo_window_plugin.h>
-auto bdw = bitsdojo_window_configure(BDW_CUSTOM_FRAME | BDW_HIDE_ON_STARTUP);
+// #include <bitsdojo_window_windows/bitsdojo_window_plugin.h>
+// auto bdw = bitsdojo_window_configure(BDW_CUSTOM_FRAME | BDW_HIDE_ON_STARTUP);
int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
_In_ wchar_t *command_line, _In_ int show_command) {