fix: consider SSD/tab height when calculating last server size
This commit is contained in:
parent
769ca13647
commit
fdf015cbcf
4 changed files with 26 additions and 1 deletions
|
|
@ -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 };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue