tree: allow moving fullscren windows with the keyboard
This commit is contained in:
parent
0ee76fc09f
commit
2a8d5d1ab6
1 changed files with 11 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue