shell: Preserve snapped state through fullscreen/minimize round-trips

This commit is contained in:
Ilia Malanin 2026-02-13 23:36:27 +01:00 committed by Victoria Brekenfeld
parent 744e0da6f9
commit 4565514e76
3 changed files with 29 additions and 1 deletions

View file

@ -2571,6 +2571,7 @@ impl Shell {
state:
FloatingRestoreData {
was_maximized,
was_snapped,
geometry,
..
},
@ -2594,6 +2595,12 @@ impl Shell {
fullscreen_geometry,
true,
);
} else if let Some(corners) = was_snapped {
*window.floating_tiled.lock().unwrap() = Some(corners);
window.set_tiled(true);
let snapped_geo = workspace.floating_layer.snapped_geometry(&corners);
window.set_geometry(snapped_geo.to_global(&workspace.output));
window.configure();
}
}
Some(FullscreenRestoreState::Tiling {
@ -4145,6 +4152,7 @@ impl Shell {
geometry: geo,
output_size: set.output.geometry().size.as_logical(),
was_maximized: false,
was_snapped: None,
},
});
} else if let Some((workspace, window)) =
@ -4691,6 +4699,7 @@ impl Shell {
geometry: from,
output_size: workspace.output.geometry().size.as_logical(),
was_maximized,
was_snapped: None,
},
}),
Some(from),