shell: Add comments explaining pre-set fullscreen before unmap

This commit is contained in:
Ilia Malanin 2026-02-23 17:21:36 +01:00 committed by Victoria Brekenfeld
parent 7f33014710
commit 60ecf70910

View file

@ -4687,6 +4687,9 @@ impl Shell {
stack.remove_window(&surface);
surface
} else {
// Must be set before `map_internal`/`unmap` below, as both may call
// intermediate `configure()`, which would send a configure event without the
// fullscreen state, causing clients like Chromium to cancel the transition.
mapped.set_fullscreen(true);
if let Some(state) = mapped.maximized_state.lock().unwrap().take() {
@ -4731,6 +4734,9 @@ impl Shell {
return None;
}
// Must be set before `unmap_surface()`.
// `Workspace::unmap_surface` may call intermediate `configure()` internally, which would send
// a configure event without the fullscreen state, causing clients like Chromium to cancel the transition.
mapped.set_fullscreen(true);
let from = workspace.element_geometry(&mapped).unwrap();