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