Skip to content

Commit f0662e4

Browse files
authored
fix(tauri-runtime-wry): window prevent overflow monitor check (#13365)
1 parent dfacb65 commit f0662e4

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"tauri-runtime-wry": patch:bug
3+
---
4+
5+
Fix monitor check on the window prevent overflow implementation.

crates/tauri-runtime-wry/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4225,12 +4225,12 @@ fn create_window<T: UserEvent, F: Fn(RawWindow) + Send + 'static>(
42254225
let monitor_size = m.size();
42264226

42274227
// type annotations required for 32bit targets.
4228-
let window_position: LogicalPosition<i32> = window_position.to_logical(m.scale_factor());
4228+
let window_position = window_position.to_physical::<i32>(m.scale_factor());
42294229

42304230
monitor_pos.x <= window_position.x
4231-
&& window_position.x <= monitor_pos.x + monitor_size.width as i32
4231+
&& window_position.x < monitor_pos.x + monitor_size.width as i32
42324232
&& monitor_pos.y <= window_position.y
4233-
&& window_position.y <= monitor_pos.y + monitor_size.height as i32
4233+
&& window_position.y < monitor_pos.y + monitor_size.height as i32
42344234
})
42354235
} else {
42364236
event_loop.primary_monitor()

0 commit comments

Comments
 (0)