Fix pointer-to-monitor location code
This commit is contained in:
parent
df81c14871
commit
e588988254
@ -673,7 +673,12 @@ fn start_unlock_dialog<'a>(conn: &'a xcb::Connection, state: &State<'a>, trigger
|
|||||||
window: monitor.root,
|
window: monitor.root,
|
||||||
});
|
});
|
||||||
let reply = conn.wait_for_reply(cookie)?;
|
let reply = conn.wait_for_reply(cookie)?;
|
||||||
if reply.same_screen() {
|
let px = reply.root_x() as i32;
|
||||||
|
let py = reply.root_y() as i32;
|
||||||
|
if reply.same_screen()
|
||||||
|
&& px >= monitor.x as i32 && px < monitor.x as i32 + monitor.width as i32
|
||||||
|
&& py >= monitor.y as i32 && py < monitor.y as i32 + monitor.height as i32
|
||||||
|
{
|
||||||
pointer_monitor = Some(monitor);
|
pointer_monitor = Some(monitor);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user