diff options
-rw-r--r-- | video/out/cocoa-cb/window.swift | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/video/out/cocoa-cb/window.swift b/video/out/cocoa-cb/window.swift index 9e2c6e3122..03ea17da57 100644 --- a/video/out/cocoa-cb/window.swift +++ b/video/out/cocoa-cb/window.swift @@ -317,6 +317,11 @@ class Window: NSWindow, NSWindowDelegate { } override func setFrame(_ frameRect: NSRect, display flag: Bool) { + if frameRect.width < minSize.width || frameRect.height < minSize.height { + mpv?.sendVerbose("tried to set too small window size: \(frameRect.size)") + return + } + super.setFrame(frameRect, display: flag) if let size = unfsContentFrame?.size, keepAspect { |