diff --git a/locker/src/main.rs b/locker/src/main.rs index 2378581..237ae1a 100644 --- a/locker/src/main.rs +++ b/locker/src/main.rs @@ -673,7 +673,12 @@ fn start_unlock_dialog<'a>(conn: &'a xcb::Connection, state: &State<'a>, trigger window: monitor.root, }); 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); break; }