mirror of https://github.com/mpv-player/mpv
mac/window: fix unfs window size retrieval
the unfsContentFrame wasn't updated when externally resized leading to a wrong unfs window size afterwards. update it on windowDidResize event when not in fs, not animating and not live resizing.
This commit is contained in:
parent
fef04315a1
commit
fc36e5d71e
|
@ -165,6 +165,7 @@ class View: NSView, CALayerDelegate {
|
|||
}
|
||||
|
||||
override func magnify(with event: NSEvent) {
|
||||
common.window?.isAnimating = event.phase != .ended
|
||||
event.phase == .ended ? common.windowDidEndLiveResize() : common.windowWillStartLiveResize()
|
||||
common.window?.addWindowScale(Double(event.magnification))
|
||||
}
|
||||
|
|
|
@ -550,6 +550,9 @@ class Window: NSWindow, NSWindowDelegate {
|
|||
}
|
||||
|
||||
func windowDidResize(_ notification: Notification) {
|
||||
if let contentViewFrame = contentView?.frame, !isAnimating && !isInFullscreen && !inLiveResize {
|
||||
unfsContentFrame = convertToScreen(contentViewFrame)
|
||||
}
|
||||
common.windowDidResize()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue