From 4bafce880c1185935824723d2b88b759c37a5598 Mon Sep 17 00:00:00 2001 From: Victoria Brekenfeld Date: Tue, 25 Oct 2022 16:36:25 +0200 Subject: [PATCH] shell/floating: Fix window size restore on toggle --- src/shell/layout/floating/mod.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/shell/layout/floating/mod.rs b/src/shell/layout/floating/mod.rs index ad05c3ff..728ee8a4 100644 --- a/src/shell/layout/floating/mod.rs +++ b/src/shell/layout/floating/mod.rs @@ -77,7 +77,7 @@ impl FloatingLayout { let mut geo_updated = false; if let Some(size) = last_geometry.map(|g| g.size) { - geo_updated = win_geo.size == size; + geo_updated = win_geo.size != size; win_geo.size = size; } { @@ -124,7 +124,6 @@ impl FloatingLayout { .into() }); - // TODO: Move this into CosmicMapped, this needs to differciate between stacks and windows mapped.set_tiled(false); if geo_updated { mapped.set_size(win_geo.size); @@ -221,6 +220,7 @@ impl FloatingLayout { } pub fn refresh(&mut self) { + self.space.refresh(); for element in self .space .elements() @@ -234,7 +234,6 @@ impl FloatingLayout { let output = self.space.outputs().next().unwrap().clone(); self.map_internal(element, &output, None); } - self.space.refresh() } pub fn most_overlapped_output_for_element(&self, elem: &CosmicMapped) -> Option {