tree: allow moving fullscreen nodes
This commit is contained in:
parent
4ebcde72ed
commit
aaf38b193f
1 changed files with 11 additions and 3 deletions
|
|
@ -963,9 +963,6 @@ pub fn toplevel_set_floating(state: &Rc<State>, tl: Rc<dyn ToplevelNode>, floati
|
|||
}
|
||||
|
||||
pub fn toplevel_set_workspace(state: &Rc<State>, tl: Rc<dyn ToplevelNode>, ws: &Rc<WorkspaceNode>) {
|
||||
if tl.tl_data().is_fullscreen.get() {
|
||||
return;
|
||||
}
|
||||
let old_ws = match tl.tl_data().workspace.get() {
|
||||
Some(ws) => ws,
|
||||
_ => return,
|
||||
|
|
@ -973,6 +970,17 @@ pub fn toplevel_set_workspace(state: &Rc<State>, tl: Rc<dyn ToplevelNode>, ws: &
|
|||
if old_ws.id == ws.id {
|
||||
return;
|
||||
}
|
||||
if tl.tl_data().is_fullscreen.get() {
|
||||
if let Some(old) = ws.fullscreen.get() {
|
||||
old.tl_set_fullscreen(false, None);
|
||||
}
|
||||
if ws.fullscreen.is_some() {
|
||||
return;
|
||||
}
|
||||
tl.clone().tl_set_fullscreen(false, None);
|
||||
tl.tl_set_fullscreen(true, Some(ws.clone()));
|
||||
return;
|
||||
}
|
||||
let cn = match tl.tl_data().parent.get() {
|
||||
Some(cn) => cn,
|
||||
_ => return,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue