-
Notifications
You must be signed in to change notification settings - Fork 3k
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
player: add --auto-window-resize option #9360
Conversation
436371d
to
79fb9a2
Compare
Sadly, the x11 change is no longer one line because the autofit/geometry stuff also must execute |
69e9edd
to
7bae9fb
Compare
i am just wondering, wouldn't it make more sense to do this deeper in the core instead of the platform specific code or is there a specific reason why we want ti implemented on every platform separately? |
I did initially attempt to do this by just messing with So as far as I can tell, this requires the reconfig call which calls a resize (this is the part that's really needed) and the only way that can be done is by propagating to every backend. |
7bae9fb
to
5007d87
Compare
I took a peek at the windows code and I think the required change is trivial so I went ahead and added it to this. |
5007d87
to
e4e7893
Compare
Another relevant case is when setting |
e4e7893
to
2d67734
Compare
P.S. if someone could test if the Windows change actually works correctly, that would be nice. mac was left out since swift makes my head spin. |
I tested it on windows, and the option of |
Thanks for confirming. I think this is OK to merge (unless there's still some disagreements over the implementation). It's missing mac support, but no one can do that other than @Akemi anyways. |
2d67734
to
e742fe5
Compare
I have always used
and never had the window auto-resize on me on switching videos (either through playlist skip, playlist end, or dragging a new video into the window), is this going to change anything? |
For your configuration, no. The main thing this does is prevent auto-resizing without having to specify an arbitrary geometry (i.e. it'll just stay at whatever the first value in the playlist happens to be). |
e742fe5
to
4bdd8ff
Compare
b189bc8
to
521c7f6
Compare
People still ping me about this occasionally and it's a useful feature so I plan to finally merge it soonish in case anyone wants to take another look at it. |
mpv's window resizing logic always automatically resized the window whenever the video resolution changed (i.e. advancing forward in a playlist). This simply introduces the option to make this behavior configurable. Every windowing backend would need to implement this behavior in their code since a reconfigure event must always be a resize. The params of the frame changed so you either have to resize the window to the new size of the params or make the params the same size as the window. This commit implements it for wayland, win32, and x11.
521c7f6
to
5adcfe3
Compare
mpv's window resizing logic always automatically resized the window
whenever the video resolution changed (i.e. advancing forward in a
playlist). This simply introduces the option to make this behavior
configurable. Every windowing backend would need to implement this
behavior in their code. This commit implements it for Wayland and X11.
Related issue: #9325