mirror of https://github.com/mpv-player/mpv
cocoa-cb: never set a window size smaller than the set minSize
this prevents a vanishing window if the size is set too small.
This commit is contained in:
parent
44f6e79439
commit
2aa4186a25
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue