floating: Restore size of moved maximized windows correctly

This commit is contained in:
Victoria Brekenfeld 2023-10-23 22:15:27 +02:00
parent d6434d322e
commit 5b7efa3a8b
5 changed files with 47 additions and 2 deletions

View file

@ -123,6 +123,16 @@ impl CosmicSurface {
}
}
pub fn pending_size(&self) -> Option<Size<i32, Logical>> {
match self {
CosmicSurface::Wayland(window) => {
window.toplevel().with_pending_state(|state| state.size)
}
CosmicSurface::X11(surface) => Some(surface.geometry().size),
_ => unreachable!(),
}
}
pub fn set_geometry(&self, geo: Rectangle<i32, Global>) {
match self {
CosmicSurface::Wayland(window) => window