Skip to content

Commit

Permalink
focus: Only consider focused output
Browse files Browse the repository at this point in the history
  • Loading branch information
Drakulix committed Dec 5, 2024
1 parent fce52cb commit 7829e76
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/shell/focus/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,19 +172,18 @@ impl Shell {
let focused_windows = self
.seats
.iter()
.flat_map(|seat| {
.map(|seat| {
if matches!(
seat.get_keyboard().unwrap().current_focus(),
Some(KeyboardFocusTarget::Group(_))
) {
return None;
}

Some(self.outputs().flat_map(|o| {
let space = self.active_space(o);
let stack = space.focus_stack.get(seat);
stack.last().cloned()
}))
let output = seat.focused_or_active_output();
let space = self.active_space(&output);
let stack = space.focus_stack.get(seat);
stack.last().cloned()
})
.flatten()
.collect::<Vec<_>>();
Expand Down Expand Up @@ -223,7 +222,7 @@ impl Shell {
for window in workspace.mapped() {
window.set_activated(false);
window.configure();
}
}
}
}
}
Expand Down

0 comments on commit 7829e76

Please sign in to comment.