mirror of https://github.com/mpv-player/mpv
parent
fa4ca16f66
commit
0d47e48437
|
@ -3400,7 +3400,6 @@ Window
|
|||
be the default behavior. Currently only affects X11 and SDL VOs.
|
||||
|
||||
``--auto-window-resize=<yes|no>``
|
||||
(Wayland, Win32, and X11)
|
||||
By default, mpv will automatically resize itself if the video's size changes
|
||||
(i.e. advancing forward in a playlist). Setting this to ``no`` disables this
|
||||
behavior so the window size never changes automatically. This option does
|
||||
|
|
|
@ -64,7 +64,7 @@ class CocoaCB: Common {
|
|||
mpv?.vo = vo
|
||||
if backendState == .needsInit {
|
||||
DispatchQueue.main.sync { self.initBackend(vo) }
|
||||
} else {
|
||||
} else if mpv?.opts.auto_window_resize ?? true {
|
||||
DispatchQueue.main.async {
|
||||
self.updateWindowSize(vo)
|
||||
self.layer?.update(force: true)
|
||||
|
|
|
@ -58,7 +58,9 @@ class MacCommon: Common {
|
|||
initWindowState()
|
||||
}
|
||||
|
||||
if !NSEqualSizes(window?.unfsContentFramePixel.size ?? NSZeroSize, wr.size) {
|
||||
if !NSEqualSizes(window?.unfsContentFramePixel.size ?? NSZeroSize, wr.size) &&
|
||||
mpv?.opts.auto_window_resize ?? true
|
||||
{
|
||||
window?.updateSize(wr.size)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue