rustdesk 2024-08-16 12:20:40 +08:00
parent 92752765ba
commit 579e0fac36
6 changed files with 7 additions and 7 deletions

View File

@ -260,7 +260,7 @@ showCmWindow({bool isStartup = false}) async {
WindowOptions windowOptions = getHiddenTitleBarWindowOptions(
size: kConnectionManagerWindowSizeClosedChat, alwaysOnTop: true);
await windowManager.waitUntilReadyToShow(windowOptions, null);
bind.mainHideDocker();
bind.mainHideDock();
await Future.wait([
windowManager.show(),
windowManager.focus(),
@ -288,14 +288,14 @@ hideCmWindow({bool isStartup = false}) async {
size: kConnectionManagerWindowSizeClosedChat);
windowManager.setOpacity(0);
await windowManager.waitUntilReadyToShow(windowOptions, null);
bind.mainHideDocker();
bind.mainHideDock();
await windowManager.minimize();
await windowManager.hide();
_isCmReadyToShow = true;
} else if (_isCmReadyToShow) {
if (await windowManager.getOpacity() != 0) {
await windowManager.setOpacity(0);
bind.mainHideDocker();
bind.mainHideDock();
await windowManager.minimize();
await windowManager.hide();
}

View File

@ -1415,7 +1415,7 @@ class RustdeskImpl {
return false;
}
bool mainHideDocker({dynamic hint}) {
bool mainHideDock({dynamic hint}) {
throw UnimplementedError();
}

View File

@ -45,5 +45,7 @@
<string>Record the sound from microphone for the purpose of the remote desktop.</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>LSUIElement</key>
<string>1</string>
</dict>
</plist>

View File

@ -1891,7 +1891,7 @@ pub fn main_is_login_wayland() -> SyncReturn<bool> {
SyncReturn(is_login_wayland())
}
pub fn main_hide_docker() -> SyncReturn<bool> {
pub fn main_hide_dock() -> SyncReturn<bool> {
#[cfg(target_os = "macos")]
crate::platform::macos::hide_dock();
SyncReturn(true)

View File

@ -493,7 +493,6 @@ pub fn lock_screen() {
}
pub fn start_os_service() {
crate::platform::macos::hide_dock();
log::info!("Username: {}", crate::username());
let mut sys = System::new();
let path =

View File

@ -12,7 +12,6 @@ pub fn start_tray() {
if crate::ui_interface::get_builtin_option(hbb_common::config::keys::OPTION_HIDE_TRAY) == "Y" {
#[cfg(target_os = "macos")]
{
crate::platform::macos::hide_dock();
loop {
std::thread::sleep(std::time::Duration::from_secs(1));
}