1
0
Fork 0
forked from wry/wry

tree: allow moving focus from/to fullscreen windows

This commit is contained in:
Julian Orth 2025-12-02 12:29:53 +01:00
parent 31fb4397cc
commit 0ee76fc09f
3 changed files with 27 additions and 8 deletions

View file

@ -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);
}
}
};

View file

@ -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 {