diff options
author | tcmal <me@aria.rip> | 2024-08-13 21:49:34 +0100 |
---|---|---|
committer | tcmal <me@aria.rip> | 2024-08-13 22:27:14 +0100 |
commit | f9d5af7f060ada6f224861967e31bb74a0d24e18 (patch) | |
tree | 882bb3058c72d9075d8af8bae0a426a6684e0d80 /src | |
parent | e4d9484d0e1ebcf496d0606800560c09d2753df4 (diff) |
Fix focus flickering bug
Diffstat (limited to 'src')
-rw-r--r-- | src/focus.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/focus.rs b/src/focus.rs index da3b81a..7a4b348 100644 --- a/src/focus.rs +++ b/src/focus.rs @@ -18,11 +18,11 @@ impl WM<'_> { } } - /// When a new window requests focus, focus it. + /// When a window attempts to focus in, refocus the actually focused window to deal with some broken clients. pub fn handle_focus_in(&mut self, e: &FocusInEvent) { if !self.clients.is_focused(e.event()) { - if let Some((mon, pos)) = self.clients.find_client_pos(e.event()) { - self.clients.refocus(&self.conn, mon, pos); + if let Some(pos) = self.clients.focused_pos() { + self.clients.refocus(&self.conn, pos.0, pos.1); } } } |