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

@ -230,6 +230,16 @@ impl CosmicWindow {
})
}
pub fn last_server_size(&self) -> Option<Size<i32, Logical>> {
self.0.with_program(|p| {
let mut size = p.window.last_server_size()?;
if p.has_ssd(false) {
size.h += SSD_HEIGHT;
}
Some(size)
})
}
pub fn set_geometry(&self, geo: Rectangle<i32, Global>) {
self.0.with_program(|p| {
let ssd_height = if p.has_ssd(true) { SSD_HEIGHT } else { 0 };