Skip to content

Commit

Permalink
Fix sticky toggle on maximized windows
Browse files Browse the repository at this point in the history
  • Loading branch information
D-Brox committed Jan 3, 2025
1 parent 9b78a2d commit ae38783
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/shell/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3604,6 +3604,27 @@ impl Shell {
ManagedLayer::Sticky => unreachable!(),
_ => workspace.floating_layer.map(mapped.clone(), geometry.loc),
}

let mut state = mapped.maximized_state.lock().unwrap();
if let Some(MaximizedState {
original_geometry,
original_layer: _,
}) = *state
{
*state = Some(MaximizedState {
original_geometry,
original_layer: mapped
.previous_layer
.lock()
.unwrap()
.take()
.unwrap_or(ManagedLayer::Floating),
});
std::mem::drop(state);
workspace
.floating_layer
.map_maximized(mapped.clone(), geometry, false);
}
}

self.append_focus_stack(&mapped, seat);
Expand Down

0 comments on commit ae38783

Please sign in to comment.