wayland: parse toplevel states before geometry_configured check#17741
Open
andrewrabert wants to merge 1 commit intompv-player:masterfrom
Open
wayland: parse toplevel states before geometry_configured check#17741andrewrabert wants to merge 1 commit intompv-player:masterfrom
andrewrabert wants to merge 1 commit intompv-player:masterfrom
Conversation
Fix toplevel state being lost before geometry_configured is configured. Previously, for a KWin rule that set fullscreen (apply initially or forced) when a --geometry was also specified, mpv would render at --geometry size even though the compositor was treating it as fullscreen. This resulted in geometry-sized content anchored to the top-right without a titlebar. This mismatch of what mpv thinks and what actually is can also be seen similarly with a KWin rule that sets a maximize state. With this change, mpv starts in fullscreen _proper_ (ie --fullscreen). Exiting fullscreen then results in a window size as specified by the --geometry. For the other states this handles, I'm honestly not sure as I wasn't able to force them. It _should_ be fine based on what I see here and _logically_ is correct as mpv's state should always match what the compositor informs it to be.
Member
|
I think this makes sense but I also want test this code path later and see if it can be simplified. |
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.
Fix toplevel state being lost before geometry_configured is configured. Previously, for a KWin rule that set fullscreen (apply initially or forced) when a --geometry was also specified, mpv would render at --geometry size even though the compositor was treating it as fullscreen. This resulted in geometry-sized content anchored to the top-right without a titlebar. This mismatch of what mpv thinks and what actually is can also be seen similarly with a KWin rule that sets a maximize state.
With this change, mpv starts in fullscreen proper (ie --fullscreen). Exiting fullscreen then results in a window size as specified by the --geometry.
For the other states this handles, I'm honestly not sure as I wasn't able to force them. It should be fine based on what I see here and logically is correct as mpv's state should always match what the compositor informs it to be.
The bug was discovered during development of https://github.com/jellyfin/jellyfin-desktop and also confirmed to exist on the mpv master branch. I tested this manually on KWin and with a build of mpv master.
The change seems to be correct per my relatively newish understanding of the protocol specs. I acknowledge that I understand and can speak to this change I made. I disclose that an LLM (Claude) was used in tracking this down.
Testing examples: KWin rule with
--geometry=1280x720