summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/focus.rs6
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);
}
}
}