Skip to main content

pick_monitor

Function pick_monitor 

Source
pub fn pick_monitor(
    click_x: i32,
    click_y: i32,
    monitors: &[MonitorBounds],
) -> Option<MonitorBounds>
Expand description

Find the monitor whose bounds contain the click position. Returns the first monitor as a fallback if no bounds contain the click (defensive — shouldn’t normally happen with valid monitor geometry, but multi-display setups can have negative coords).