From b2afde4b27e82944250143304529210e6d6ad5aa Mon Sep 17 00:00:00 2001 From: rustdesk Date: Tue, 7 Feb 2023 00:18:25 +0800 Subject: [PATCH] tmp workaround of '-cm' not exit cause rustdesk not launchable from finder --- src/flutter.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/flutter.rs b/src/flutter.rs index d8f83c6b2..761f8a612 100644 --- a/src/flutter.rs +++ b/src/flutter.rs @@ -39,7 +39,8 @@ pub extern "C" fn rustdesk_core_main() -> bool { #[no_mangle] pub extern "C" fn handle_applicationShouldOpenUntitledFile() { hbb_common::log::debug!("icon clicked on finder"); - if std::env::args().nth(1) == Some("--server".to_owned()) { + let x = std::env::args().nth(1).unwrap_or_default(); + if x == "--server" || x == "--cm" { crate::platform::macos::check_main_window(); } }