fix(tauri-runtime-wry): window prevent overflow monitor check (#13365)

This commit is contained in:
Lucas Fernandes Nogueira
2025-05-03 14:31:43 -03:00
committed by GitHub
parent dfacb656d2
commit f0662e41f4
2 changed files with 8 additions and 3 deletions

View File

@@ -0,0 +1,5 @@
---
"tauri-runtime-wry": patch:bug
---
Fix monitor check on the window prevent overflow implementation.

View File

@@ -4225,12 +4225,12 @@ fn create_window<T: UserEvent, F: Fn(RawWindow) + Send + 'static>(
let monitor_size = m.size();
// type annotations required for 32bit targets.
let window_position: LogicalPosition<i32> = window_position.to_logical(m.scale_factor());
let window_position = window_position.to_physical::<i32>(m.scale_factor());
monitor_pos.x <= window_position.x
&& window_position.x <= monitor_pos.x + monitor_size.width as i32
&& window_position.x < monitor_pos.x + monitor_size.width as i32
&& monitor_pos.y <= window_position.y
&& window_position.y <= monitor_pos.y + monitor_size.height as i32
&& window_position.y < monitor_pos.y + monitor_size.height as i32
})
} else {
event_loop.primary_monitor()