mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-12 19:17:58 +00:00
opt: hide main window when using shortcut
This commit is contained in:
@@ -118,13 +118,18 @@ void runMainApp(bool startService) async {
|
||||
gFFI.serverModel.startService();
|
||||
}
|
||||
runApp(App());
|
||||
// check the startup argument, if we successfully handle the argument, we keep the main window hidden.
|
||||
if (checkArguments()) {
|
||||
windowManager.hide();
|
||||
} else {
|
||||
windowManager.show();
|
||||
windowManager.focus();
|
||||
}
|
||||
// set window option
|
||||
WindowOptions windowOptions = getHiddenTitleBarWindowOptions();
|
||||
windowManager.waitUntilReadyToShow(windowOptions, () async {
|
||||
restoreWindowPosition(WindowType.Main);
|
||||
await windowManager.show();
|
||||
await windowManager.focus();
|
||||
await windowManager.setOpacity(1);
|
||||
windowManager.setOpacity(1);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user