focus: Fall back to first window, if stack is empty

This commit is contained in:
Victoria Brekenfeld 2024-07-03 21:03:58 +02:00
parent c933aa1a4f
commit dc882ffc36

View file

@ -453,6 +453,7 @@ fn update_focus_target(
.focus_stack
.get(&seat)
.last()
.or_else(|| shell.active_space(&output).mapped().next())
.cloned()
.map(KeyboardFocusTarget::from)
}