1
0
Fork 0
forked from wry/wry

tree: allow moving fullscren windows with the keyboard

This commit is contained in:
Julian Orth 2025-12-02 12:34:18 +01:00
parent 0ee76fc09f
commit 2a8d5d1ab6

View file

@ -747,8 +747,17 @@ impl WlSeatGlobal {
pub fn move_focused(self: &Rc<Self>, direction: Direction) {
let kb_node = self.keyboard_node.get();
if let Some(tl) = kb_node.node_toplevel()
&& let Some(parent) = tl.tl_data().parent.get()
let Some(tl) = kb_node.node_toplevel() else {
return;
};
let data = tl.tl_data();
if data.is_fullscreen.get()
&& let Some(output) = data.output_opt()
&& let Some(target) = self.state.find_output_in_direction(&output, direction)
{
let ws = target.ensure_workspace();
toplevel_set_workspace(&self.state, tl, &ws);
} else if let Some(parent) = data.parent.get()
&& let Some(c) = parent.node_into_container()
{
c.move_child(tl, direction);