Skip to content

Commit 1734273

Browse files
fix: using center and overflow together crashes (#13235)
1 parent 690146e commit 1734273

File tree

1 file changed

+2
-2
lines changed
  • crates/tauri-runtime-wry/src/window

1 file changed

+2
-2
lines changed

crates/tauri-runtime-wry/src/window/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ pub fn calculate_window_center_position(
7777
}
7878

7979
tao::dpi::PhysicalPosition::new(
80-
(monitor_size.width - window_size.width) as i32 / 2 + monitor_position.x,
81-
(monitor_size.height - window_size.height) as i32 / 2 + monitor_position.y,
80+
(monitor_size.width as i32 - window_size.width as i32) / 2 + monitor_position.x,
81+
(monitor_size.height as i32 - window_size.height as i32) / 2 + monitor_position.y,
8282
)
8383
}

0 commit comments

Comments
 (0)