fix: ensure main window title is set correctly on macOS

This commit is contained in:
Tunglies 2025-03-20 15:43:52 +08:00
parent 04bdd48a2a
commit 56e6139c2b

View File

@ -250,11 +250,12 @@ pub fn run() {
AppHandleManager::global().init(app_handle.clone()); AppHandleManager::global().init(app_handle.clone());
#[cfg(target_os = "macos")] #[cfg(target_os = "macos")]
{ {
let main_window = AppHandleManager::global() if let Some(window) = AppHandleManager::global()
.get_handle() .get_handle()
.get_webview_window("main") .get_webview_window("main")
.unwrap(); {
let _ = main_window.set_title("Clash Verge"); let _ = window.set_title("Clash Verge");
}
} }
} }
#[cfg(target_os = "macos")] #[cfg(target_os = "macos")]