fix: linux build failed

This commit is contained in:
huzibaca 2024-11-27 05:54:48 +08:00
parent 94d22ecfc3
commit 56f6de5410

View File

@ -148,7 +148,7 @@ pub fn create_window() {
}).join().unwrap()
}.unwrap();
#[cfg(not(target_os = "windows"))]
#[cfg(target_os = "macos")]
let window = tauri::WebviewWindowBuilder::new(
&app_handle,
"main".to_string(),
@ -161,6 +161,13 @@ pub fn create_window() {
.build()
.unwrap();
#[cfg(target_os = "linux")]
let window = builder
.decorations(false)
.transparent(true)
.build()
.unwrap();
match window.restore_state(StateFlags::all()) {
Ok(_) => {
log::info!(target: "app", "window state restored successfully");