shell/tiling: Allow moving alone windows

This commit is contained in:
Victoria Brekenfeld 2022-11-11 23:24:19 +01:00
parent 5bf7059a43
commit 15fe9af342

View file

@ -458,7 +458,14 @@ impl TilingLayout {
let mut child_id = node_id.clone();
// Without a parent to start with, just return
let og_parent = tree.get(&node_id).unwrap().parent().cloned()?;
let Some(og_parent) = tree.get(&node_id).unwrap().parent().cloned() else {
let data = tree.get(&node_id).unwrap().data();
assert!(data.is_mapped(None));
return match data {
Data::Mapped { mapped, .. } => Some(mapped.clone()),
_ => unreachable!(),
};
};
let og_idx = tree
.children_ids(&og_parent)
.unwrap()