tiling: Properly center windows with gaps
This commit is contained in:
parent
15fe9af342
commit
77858d3628
1 changed files with 26 additions and 22 deletions
|
|
@ -1087,13 +1087,13 @@ impl TilingLayout {
|
||||||
.into_iter()
|
.into_iter()
|
||||||
{
|
{
|
||||||
let node = tree.get_mut(&node_id).unwrap();
|
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();
|
let data = node.data_mut();
|
||||||
data.update_geometry(geo);
|
|
||||||
match data {
|
match data {
|
||||||
Data::Group {
|
Data::Group {
|
||||||
orientation, sizes, ..
|
orientation, sizes, ..
|
||||||
} => match orientation {
|
} => {
|
||||||
|
match orientation {
|
||||||
Orientation::Horizontal => {
|
Orientation::Horizontal => {
|
||||||
let mut previous: i32 = sizes.iter().sum();
|
let mut previous: i32 = sizes.iter().sum();
|
||||||
for size in sizes.iter().rev() {
|
for size in sizes.iter().rev() {
|
||||||
|
|
@ -1114,7 +1114,9 @@ impl TilingLayout {
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
|
data.update_geometry(geo);
|
||||||
|
}
|
||||||
Data::Mapped { mapped, .. } => {
|
Data::Mapped { mapped, .. } => {
|
||||||
if !(mapped.is_fullscreen() || mapped.is_maximized()) {
|
if !(mapped.is_fullscreen() || mapped.is_maximized()) {
|
||||||
mapped.set_tiled(true);
|
mapped.set_tiled(true);
|
||||||
|
|
@ -1123,6 +1125,8 @@ impl TilingLayout {
|
||||||
);
|
);
|
||||||
mapped.configure();
|
mapped.configure();
|
||||||
}
|
}
|
||||||
|
geo.loc += (inner, inner).into();
|
||||||
|
data.update_geometry(geo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue