tree: allow moving focus from/to fullscreen windows
This commit is contained in:
parent
31fb4397cc
commit
0ee76fc09f
3 changed files with 27 additions and 8 deletions
|
|
@ -1013,12 +1013,8 @@ impl ContainerNode {
|
|||
if let Some(parent) = self.toplevel_data.parent.get() {
|
||||
if let Some(c) = parent.node_into_container() {
|
||||
c.move_focus_from_child(seat, self.deref(), direction);
|
||||
} else if let Some(output) = self.find_neighboring_output(direction)
|
||||
&& let Some(ws) = output.workspace.get()
|
||||
&& let Some(c) = ws.container.get()
|
||||
&& c.node_visible()
|
||||
{
|
||||
c.node_do_focus(seat, direction);
|
||||
} else if let Some(output) = self.find_neighboring_output(direction) {
|
||||
output.take_keyboard_navigation_focus(seat, direction);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1488,6 +1488,21 @@ impl OutputNode {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn take_keyboard_navigation_focus(&self, seat: &Rc<WlSeatGlobal>, direction: Direction) {
|
||||
let Some(ws) = self.workspace.get() else {
|
||||
return;
|
||||
};
|
||||
if let Some(fs) = ws.fullscreen.get() {
|
||||
if fs.node_visible() {
|
||||
fs.node_do_focus(seat, direction);
|
||||
}
|
||||
} else if let Some(c) = ws.container.get() {
|
||||
if c.node_visible() {
|
||||
c.node_do_focus(seat, direction);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct OutputTitle {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue