Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
7c1f24b824 | ||
|
b7d44d96ba |
@@ -120,13 +120,25 @@ void main() async {
|
|||||||
windowButtonVisibility: true,
|
windowButtonVisibility: true,
|
||||||
);
|
);
|
||||||
windowManager.waitUntilReadyToShow(windowOptions, () async {
|
windowManager.waitUntilReadyToShow(windowOptions, () async {
|
||||||
|
final env = Platform.environment;
|
||||||
|
final isWayland = env.containsKey('WAYLAND_DISPLAY');
|
||||||
|
|
||||||
|
if (isWayland) {
|
||||||
|
try {
|
||||||
|
await windowManager.setAsFrameless();
|
||||||
|
} catch (e) {
|
||||||
|
debugPrint('[Wayland] setAsFrameless failed: $e');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
await windowManager.setAsFrameless();
|
||||||
await windowManager.setMinimumSize(defaultSize);
|
await windowManager.setMinimumSize(defaultSize);
|
||||||
await windowManager.show();
|
await windowManager.show();
|
||||||
await windowManager.focus();
|
await windowManager.focus();
|
||||||
final opacity = prefs.getDouble(kAppWindowOpacity) ?? 1.0;
|
final opacity = prefs.getDouble(kAppWindowOpacity) ?? 1.0;
|
||||||
await windowManager.setOpacity(opacity);
|
await windowManager.setOpacity(opacity);
|
||||||
talker.info(
|
talker.info(
|
||||||
"[SplashScreen] Desktop window is ready with size: ${initialSize.width}x${initialSize.height}",
|
"[SplashScreen] Desktop window is ready with size: ${initialSize.width}x${initialSize.height}"
|
||||||
|
"${isWayland ? " (Wayland frameless fix applied)" : ""}",
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user