Skip to content

Commit

Permalink
fix(core): compile error for 32bit targets (#9361)
Browse files Browse the repository at this point in the history
* fix(core): compile error for 32bit targets

* clippy giving me trust issues
  • Loading branch information
FabianLars committed Apr 3, 2024
1 parent 6251645 commit 2f20fdf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .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.
7 changes: 4 additions & 3 deletions core/tauri-runtime-wry/src/lib.rs
Expand Up @@ -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)
}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 2f20fdf

Please sign in to comment.