Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: apply activated state when updating maximized layout #521

Merged
merged 1 commit into from
May 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions src/shell/layout/floating/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
}
}

Expand Down