fix: preserve fullscreen state when moving window between workspaces#2135
Open
mayakwd wants to merge 3 commits intopop-os:masterfrom
Open
fix: preserve fullscreen state when moving window between workspaces#2135mayakwd wants to merge 3 commits intopop-os:masterfrom
mayakwd wants to merge 3 commits intopop-os:masterfrom
Conversation
d6c1ab9 to
d6a94c3
Compare
Drakulix
reviewed
Mar 12, 2026
Member
Drakulix
left a comment
There was a problem hiding this comment.
Thanks. This looks good apart from some nitpicks.
src/shell/workspace.rs
Outdated
| Option<FullscreenRestoreState>, | ||
| Option<Rectangle<i32, Local>>, | ||
| )> { | ||
| let surface = self.fullscreen.take()?; |
Member
There was a problem hiding this comment.
Suggested change
| let surface = self.fullscreen.take()?; | |
| let surface = self.fullscreen.take_if(|s| s.ended_at.is_none())?; |
Would be a bit cleaner here and avoid the whole condition.
Contributor
Author
There was a problem hiding this comment.
Good point! Done.
src/shell/workspace.rs
Outdated
| focus_stack.retain(|t| t != &surface.surface); | ||
| } | ||
|
|
||
| Some((surface.previous_state, surface.previous_geometry)) |
Member
There was a problem hiding this comment.
Could this for symmetry with remove_fullscreen please also return the surface. That is easy enough to skip over in move_window.
c0eec5f to
1e4594f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Following up #2099.
Fixes the issue where moving a full-screen window (e.g., Chrome with a full-screen video) between workspaces causes the client to exit full-screen.
Root cause:
move_windowcallsunmap_surface, which internally callsremove_fullscreen(). This sends an intermediate configure withset_fullscreen(false)beforemap_fullscreen(), and thenmap_fullscreen ()re-applies it on the destination workspace.Chrome sees the intermediate "not a full-screen"
configureand cancels video full-screen.Fix explanation:
Workspace::take_fullscreen()— a silent counterpart toremove_fullscreen()that extracts the fullscreen state without notifying the client (no set_fullscreen(false), no send_configure(), no exit animation).take_fullscreen()instead ofunmap_surface(). The destination workspace'smap_fullscreen()then sends a single configure with fullscreen state preserved.remove_fullscreen()andunmap_surface()remain unchanged — all other code paths (close, minimize, unfullscreen, drag-move) still go through the original flow with proper client notification and exit animation.What I tested:
What I didn't test:
toplevel_leave_outputandtoplevel_enter_outputhandle this case.UPD
Added agreement section from PR template: