Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: make maximize workaround windows specific #795

Merged

Conversation

christoph-heinrich
Copy link
Contributor

@christoph-heinrich christoph-heinrich commented Nov 15, 2023

@tomasklaen tomasklaen merged commit 96b57b2 into tomasklaen:main Nov 15, 2023
@christoph-heinrich christoph-heinrich deleted the maximize_windows_specific branch November 15, 2023 19:28
@christoph-heinrich
Copy link
Contributor Author

christoph-heinrich commented Nov 16, 2023

Turns out there is a race condition here on wayland. Happens on both kwin and weston.
The compositor ignores the unmaximize request if mpv is still considered fullscreen. For me it depends on the CPU usage if the timing works out or not.

I guess the simplest way to deal with that would be to add a small delay between setting fullscreen and setting window-maximized and hope it's enough, or a hook that waits for fullscreen to change before setting window-maximized.

No idea if other platforms might have the same problem.

Edit: hook doesn't work reliably. Delay of 0.1s works but is noticeable and 0.01s works unreliably. 0.02s looks to be reliable for me, but I'm not a big fan of fixed time delays...

Alternatively the button could always only unfullscreen and not touch maximized if fullscreened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants