From 2f20fdf1d6b92fa8b9b38caf7321c3ce3e895f1b Mon Sep 17 00:00:00 2001 From: Fabian-Lars Date: Wed, 3 Apr 2024 17:19:21 +0200 Subject: [PATCH] fix(core): compile error for 32bit targets (#9361) * fix(core): compile error for 32bit targets * clippy giving me trust issues --- .changes/fix-runtime-wry-32bit.md | 5 +++++ core/tauri-runtime-wry/src/lib.rs | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 .changes/fix-runtime-wry-32bit.md diff --git a/.changes/fix-runtime-wry-32bit.md b/.changes/fix-runtime-wry-32bit.md new file mode 100644 index 000000000..712cf1ec7 --- /dev/null +++ b/.changes/fix-runtime-wry-32bit.md @@ -0,0 +1,5 @@ +--- +tauri-runtime-wry: patch:bug +--- + +Fixes an issue causing compilation to fail for i686 and armv7 32-bit targets. \ No newline at end of file diff --git a/core/tauri-runtime-wry/src/lib.rs b/core/tauri-runtime-wry/src/lib.rs index 586774f24..5586e9404 100644 --- a/core/tauri-runtime-wry/src/lib.rs +++ b/core/tauri-runtime-wry/src/lib.rs @@ -1525,12 +1525,12 @@ impl WindowDispatch for WryWindowDispatcher { window_getter!(self, WindowMessage::IsFocused) } - /// Gets the window’s current decoration state. + /// Gets the window's current decoration state. fn is_decorated(&self) -> Result { window_getter!(self, WindowMessage::IsDecorated) } - /// Gets the window’s current resizable state. + /// Gets the window's current resizable state. fn is_resizable(&self) -> Result { window_getter!(self, WindowMessage::IsResizable) } @@ -3517,7 +3517,8 @@ fn create_window( let monitor_pos = m.position(); let monitor_size = m.size(); - let window_position = window_position.to_logical(m.scale_factor()); + // type annotations required for 32bit targets. + let window_position: LogicalPosition = window_position.to_logical(m.scale_factor()); monitor_pos.x <= window_position.x && window_position.x <= monitor_pos.x + monitor_size.width as i32