feat: advanced option, main window, always on top (#12731)
Some checks are pending
CI / ${{ matrix.job.target }} (${{ matrix.job.os }}) (map[os:ubuntu-22.04 target:x86_64-unknown-linux-gnu]) (push) Waiting to run
Full Flutter CI / run-ci (push) Waiting to run

Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
fufesou 2025-08-26 00:15:55 +08:00 committed by GitHub
parent 6381f43f01
commit db4296533a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 3 deletions

View File

@ -147,9 +147,15 @@ void runMainApp(bool startService) async {
gFFI.userModel.refreshCurrentUser();
runApp(App());
bool? alwaysOnTop;
if (isDesktop) {
alwaysOnTop =
bind.mainGetBuildinOption(key: "main-window-always-on-top") == 'Y';
}
// Set window option.
WindowOptions windowOptions =
getHiddenTitleBarWindowOptions(isMainWindow: true);
WindowOptions windowOptions = getHiddenTitleBarWindowOptions(
isMainWindow: true, alwaysOnTop: alwaysOnTop);
windowManager.waitUntilReadyToShow(windowOptions, () async {
// Restore the location of the main window before window hide or show.
await restoreWindowPosition(WindowType.Main);

@ -1 +1 @@
Subproject commit 221c2bfb3e60139cd0db6bfb06ec950afb17a66c
Subproject commit 5b6c0cf49a6773ccca9c9e9bf18ebc8716734873