fix(core): compile error for 32bit targets (#9361)

* fix(core): compile error for 32bit targets

* clippy giving me trust issues
This commit is contained in:
Fabian-Lars 2024-04-03 17:19:21 +02:00 committed by GitHub
parent 6251645acf
commit 2f20fdf1d6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 3 deletions

View File

@ -0,0 +1,5 @@
---
tauri-runtime-wry: patch:bug
---
Fixes an issue causing compilation to fail for i686 and armv7 32-bit targets.

View File

@ -1525,12 +1525,12 @@ impl<T: UserEvent> WindowDispatch<T> for WryWindowDispatcher<T> {
window_getter!(self, WindowMessage::IsFocused)
}
/// Gets the windows current decoration state.
/// Gets the window's current decoration state.
fn is_decorated(&self) -> Result<bool> {
window_getter!(self, WindowMessage::IsDecorated)
}
/// Gets the windows current resizable state.
/// Gets the window's current resizable state.
fn is_resizable(&self) -> Result<bool> {
window_getter!(self, WindowMessage::IsResizable)
}
@ -3517,7 +3517,8 @@ fn create_window<T: UserEvent, F: Fn(RawWindow) + Send + 'static>(
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<i32> = window_position.to_logical(m.scale_factor());
monitor_pos.x <= window_position.x
&& window_position.x <= monitor_pos.x + monitor_size.width as i32