tiling: Properly center windows with gaps

This commit is contained in:
Victoria Brekenfeld 2022-11-12 13:51:32 +01:00
parent 15fe9af342
commit 77858d3628

View file

@ -1087,13 +1087,13 @@ impl TilingLayout {
.into_iter()
{
let node = tree.get_mut(&node_id).unwrap();
if let Some(geo) = stack.pop() {
if let Some(mut geo) = stack.pop() {
let data = node.data_mut();
data.update_geometry(geo);
match data {
Data::Group {
orientation, sizes, ..
} => match orientation {
} => {
match orientation {
Orientation::Horizontal => {
let mut previous: i32 = sizes.iter().sum();
for size in sizes.iter().rev() {
@ -1114,7 +1114,9 @@ impl TilingLayout {
));
}
}
},
}
data.update_geometry(geo);
}
Data::Mapped { mapped, .. } => {
if !(mapped.is_fullscreen() || mapped.is_maximized()) {
mapped.set_tiled(true);
@ -1123,6 +1125,8 @@ impl TilingLayout {
);
mapped.configure();
}
geo.loc += (inner, inner).into();
data.update_geometry(geo);
}
}
}