mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-04-01 10:01:07 +02:00
fix(tauri-runtime-wry): window prevent overflow monitor check (#13365)
This commit is contained in:
committed by
GitHub
parent
dfacb656d2
commit
f0662e41f4
5
.changes/fix-prevent-overflow-monitor-check.md
Normal file
5
.changes/fix-prevent-overflow-monitor-check.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri-runtime-wry": patch:bug
|
||||
---
|
||||
|
||||
Fix monitor check on the window prevent overflow implementation.
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user