From 13e67f3dc2bd14d80de0d200671be70f9fbdc761 Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Thu, 30 May 2024 15:21:49 -0400 Subject: [PATCH] fix: apply activated state when updating maximized layout --- src/shell/layout/floating/mod.rs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/shell/layout/floating/mod.rs b/src/shell/layout/floating/mod.rs index 0f4e9311..7476ddd7 100644 --- a/src/shell/layout/floating/mod.rs +++ b/src/shell/layout/floating/mod.rs @@ -1173,10 +1173,10 @@ impl FloatingLayout { } // update maximized elements - let update = self + let update: Vec<_> = self .space .elements() - .find(|e| e.is_maximized(false)) + .filter(|e| e.is_maximized(true)) .map(|mapped| { let output = self.space.outputs().next().unwrap().clone(); let layers = layer_map_for_output(&output); @@ -1186,10 +1186,13 @@ impl FloatingLayout { mapped.set_geometry(geometry.to_global(&output)); mapped.configure(); - (mapped.clone(), geometry.loc) - }); - if let Some((mapped, position)) = update { - self.space.map_element(mapped, position.as_logical(), true); + (mapped.clone(), geometry.loc, mapped.is_activated(true)) + }) + .collect(); + + for (mapped, position, is_activated) in update { + self.space + .map_element(mapped, position.as_logical(), is_activated); } }