fix crash on windows
This commit is contained in:
@@ -17,7 +17,6 @@ tauri-build = { version = "1.4", features = [] }
|
||||
serde_json = "1.0"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
tauri = { version = "1.4", features = [
|
||||
"macos-private-api",
|
||||
"window-close",
|
||||
"window-print",
|
||||
"window-create",
|
||||
@@ -54,6 +53,8 @@ sqlx-cli = { version = "0.7.0", default-features = false, features = [
|
||||
] }
|
||||
rust-argon2 = "1.0"
|
||||
webpage = { version = "1.6.0", features = ["serde"] }
|
||||
|
||||
[target.'cfg(any(target_os = "macos"))'.dependencies]
|
||||
cocoa = "0.25.0"
|
||||
objc = "0.2.7"
|
||||
|
||||
|
||||
@@ -114,14 +114,16 @@ fn main() {
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
window.set_transparent_titlebar(true);
|
||||
#[cfg(target_os = "macos")]
|
||||
window.position_traffic_lights(16.0, 25.0);
|
||||
|
||||
Ok(())
|
||||
})
|
||||
.on_window_event(|e| {
|
||||
#[cfg(target_os = "macos")]
|
||||
if let WindowEvent::Resized(..) = e.event() {
|
||||
let window = e.window();
|
||||
window.position_traffic_lights(16., 25.);
|
||||
window.position_traffic_lights(16.0, 25.0);
|
||||
}
|
||||
})
|
||||
.plugin(
|
||||
|
||||
Reference in New Issue
Block a user