Fix SSD width to use toplevel "geometry"
We really need to do something about the term "geometry" being overloaded.
This commit is contained in:
parent
c957d673ba
commit
418954a34b
1 changed files with 6 additions and 2 deletions
|
|
@ -225,15 +225,19 @@ impl CosmicWindow {
|
||||||
.set_geometry(Rectangle::from_loc_and_size(loc, size));
|
.set_geometry(Rectangle::from_loc_and_size(loc, size));
|
||||||
p.mask.lock().unwrap().take();
|
p.mask.lock().unwrap().take();
|
||||||
});
|
});
|
||||||
self.0.resize(Size::from((geo.size.w, SSD_HEIGHT)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn on_commit(&self, surface: &WlSurface) {
|
pub fn on_commit(&self, surface: &WlSurface) {
|
||||||
|
let mut geo = None;
|
||||||
self.0.with_program(|p| {
|
self.0.with_program(|p| {
|
||||||
if &p.window == surface {
|
if &p.window == surface {
|
||||||
p.window.0.on_commit();
|
p.window.0.on_commit();
|
||||||
|
geo = Some(p.window.geometry());
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
|
if let Some(geo) = geo {
|
||||||
|
self.0.resize(Size::from((geo.size.w, SSD_HEIGHT)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn surface(&self) -> CosmicSurface {
|
pub fn surface(&self) -> CosmicSurface {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue