Fix fullscreen configure events sending size 0,0 during state transitions#4695
Closed
Fix fullscreen configure events sending size 0,0 during state transitions#4695
Conversation
When a window transitions to fullscreen, the state change callback happens before the resize callback, causing configure events to be sent with size 0,0. This confuses Chrome which interprets it as a refusal to go fullscreen. The fix: when requested_window_size() is not yet set, fall back to the scene surface's window_size() instead of defaulting to 0,0. Co-authored-by: AlanGriffiths <9048879+AlanGriffiths@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix fullscreen behavior of videos in Google Chrome
Fix fullscreen configure events sending size 0,0 during state transitions
Feb 18, 2026
Contributor
|
Fixed in #4698 instead |
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.
Related: pop-os/cosmic-comp#1642, pop-os/cosmic-comp#2099
What's new?
Chrome video fullscreen fails because
XdgToplevelStable::send_toplevel_configure()sends size 0,0 whenrequested_window_size()isn't set. This occurs when state change observers fire before resize observers update the cached size.Fix: Fall back to
scene_surface()->window_size()whenrequested_window_size()is unavailable. Scene surface is updated synchronously by the window manager, so it reflects correct size even when async observer callbacks haven't run.Applied to both
xdg_shell_stable.cppandxdg_shell_v6.cpp.How to test
Checklist
Original prompt
This section details on the original issue you should resolve
<issue_title>Making videos fullscreen in Google Chrome fails if the window isn't already fullscreen</issue_title>
<issue_description>### Version
v2.25.2
Environment
OS: Ubuntu 24.04
What happened? What did you expect to happen?
When you fullscreen a video in Google Chrome it will instead just make the window fullscreen (like using F11). If the window is already fullscreen then the video does become fullscreen. This doesn't occur with Firefox, but it also doesn't occur when using Google Chrome in GNOME.
I think this issue for the Pop OS Cosmic compositor is the same: [BUG] Maximized chromium browsers: clicking video fullscreen makes browser fullscreen instead and their fix is here: fix: window state preservation
Reproduction steps
No response
Relevant log output