shell: Lift next_focus to mix-and-match sticky and floating windows
This commit is contained in:
parent
a829978ce9
commit
35264ca4a6
3 changed files with 150 additions and 31 deletions
|
|
@ -61,7 +61,7 @@ use super::{
|
|||
},
|
||||
focus::{
|
||||
target::{KeyboardFocusTarget, PointerFocusTarget, WindowGroup},
|
||||
FocusDirection, FocusStack, FocusStackMut,
|
||||
FocusStack, FocusStackMut,
|
||||
},
|
||||
grabs::ResizeEdge,
|
||||
layout::tiling::{Data, NodeDesc},
|
||||
|
|
@ -734,25 +734,6 @@ impl Workspace {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn next_focus<'a>(
|
||||
&mut self,
|
||||
direction: FocusDirection,
|
||||
seat: &Seat<State>,
|
||||
swap_desc: Option<NodeDesc>,
|
||||
) -> FocusResult {
|
||||
if self.fullscreen.is_some() {
|
||||
return FocusResult::None;
|
||||
}
|
||||
|
||||
let focus_stack = self.focus_stack.get(seat);
|
||||
self.floating_layer
|
||||
.next_focus(direction, seat, focus_stack.iter())
|
||||
.or_else(|| {
|
||||
self.tiling_layer
|
||||
.next_focus(direction, seat, focus_stack.iter(), swap_desc)
|
||||
})
|
||||
}
|
||||
|
||||
pub fn render<'a, R>(
|
||||
&self,
|
||||
renderer: &mut R,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue