fix: consider SSD/tab height when calculating last server size

This commit is contained in:
Hojjat 2026-04-14 18:06:34 -06:00 committed by Jacob Kauffmann
parent 769ca13647
commit fdf015cbcf
4 changed files with 26 additions and 1 deletions

View file

@ -566,6 +566,13 @@ impl CosmicStack {
.with_program(|p| (*p.geometry.lock().unwrap()).map(|geo| geo.size.as_logical()))
}
pub fn last_server_size(&self) -> Option<Size<i32, Logical>> {
let mut size = self.active().last_server_size()?;
// if stacked the window doesn't have SSD, instead it has a tab
size.h += TAB_HEIGHT;
Some(size)
}
pub fn set_geometry(&self, geo: Rectangle<i32, Global>) {
self.0.with_program(|p| {
let loc = (geo.loc.x, geo.loc.y + TAB_HEIGHT);