Skip to main content

position_is_reasonable

Function position_is_reasonable 

Source
pub fn position_is_reasonable(x: i32, y: i32) -> bool
Expand description

Check if a window position is reasonable (likely on screen).

Since we can’t easily detect monitors without a window handle or active event loop, we use heuristics to filter out obviously invalid coordinates (e.g. from corrupted state or disconnected monitors resulting in huge coordinates).