Skip to content

An open-source remote desktop application designed for self-hosting, as an alternative to TeamViewer.

fix: macos, main window, dark theme, border (#10749)

fufesou2a0e8c109b58
diff --git a/flutter/lib/main.dart b/flutter/lib/main.dart
index 3032a2321..5493975fa 100644
--- a/flutter/lib/main.dart
+++ b/flutter/lib/main.dart
@@ -133,7 +133,8 @@ void runMainApp(bool startService) async {
runApp(App());
// Set window option.
- WindowOptions windowOptions = getHiddenTitleBarWindowOptions();
+ WindowOptions windowOptions =
+ getHiddenTitleBarWindowOptions(isMainWindow: true);
windowManager.waitUntilReadyToShow(windowOptions, () async {
// Restore the location of the main window before window hide or show.
await restoreWindowPosition(WindowType.Main);
@@ -354,7 +355,10 @@ void runInstallPage() async {
}
WindowOptions getHiddenTitleBarWindowOptions(
- {Size? size, bool center = false, bool? alwaysOnTop}) {
+ {bool isMainWindow = false,
+ Size? size,
+ bool center = false,
+ bool? alwaysOnTop}) {
var defaultTitleBarStyle = TitleBarStyle.hidden;
// we do not hide titlebar on win7 because of the frame overflow.
if (kUseCompatibleUiMode) {
@@ -363,7 +367,7 @@ WindowOptions getHiddenTitleBarWindowOptions(
return WindowOptions(
size: size,
center: center,
- backgroundColor: Colors.transparent,
+ backgroundColor: (isMacOS && isMainWindow) ? null : Colors.transparent,
skipTaskbar: false,
titleBarStyle: defaultTitleBarStyle,
alwaysOnTop: alwaysOnTop,