stack: Remember previous position during focus navigation

This commit is contained in:
Victoria Brekenfeld 2025-02-24 21:43:16 +01:00 committed by Victoria Brekenfeld
parent e6f563d04e
commit e116f20396
6 changed files with 137 additions and 73 deletions

View file

@ -319,9 +319,14 @@ impl CosmicMapped {
}
}
pub fn handle_focus(&self, direction: FocusDirection, swap: Option<NodeDesc>) -> bool {
pub fn handle_focus(
&self,
seat: &Seat<State>,
direction: FocusDirection,
swap: Option<NodeDesc>,
) -> bool {
if let CosmicMappedInternal::Stack(stack) = &self.element {
stack.handle_focus(direction, swap)
stack.handle_focus(seat, direction, swap)
} else {
false
}