diff options
author | der richter <der.richter@gmx.de> | 2019-11-30 23:47:52 +0100 |
---|---|---|
committer | der richter <der.richter@gmx.de> | 2019-12-15 20:07:11 +0100 |
commit | c8cc203735d73f62def2692d1027f45ac10c03db (patch) | |
tree | 021ddf9157de39ea066f727f7bc298eb2915531b /video/out/cocoa-cb/window.swift | |
parent | e5676a67eef087aba1ccc0ab707cc5f96cc09470 (diff) | |
download | mpv-c8cc203735d73f62def2692d1027f45ac10c03db.tar.bz2 mpv-c8cc203735d73f62def2692d1027f45ac10c03db.tar.xz |
cocoa-cb: use m_config_cache and new VOCTRL for option handling
this removes the direct access of the mp_vo_opts stuct via the vo struct
and replaces it with the m_config_cache usage. this updates the
fullscreen and window-minimized property via m_config_cache_write_opt
instead of the old mechanism via VOCTRL and event flagging. also use the
new VOCTRL_VO_OPTS_CHANGED event for fullscreen and border changes.
Diffstat (limited to 'video/out/cocoa-cb/window.swift')
-rw-r--r-- | video/out/cocoa-cb/window.swift | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/video/out/cocoa-cb/window.swift b/video/out/cocoa-cb/window.swift index 1ac0e2bc78..48f3210a22 100644 --- a/video/out/cocoa-cb/window.swift +++ b/video/out/cocoa-cb/window.swift @@ -182,7 +182,7 @@ class Window: NSWindow, NSWindowDelegate { func windowDidEnterFullScreen(_ notification: Notification) { isInFullscreen = true - cocoaCB.flagEvents(VO_EVENT_FULLSCREEN_STATE) + cocoaCB.mpv?.setConfigProperty(fullscreen: isInFullscreen) cocoaCB.updateCusorVisibility() endAnimation(frame) cocoaCB.titleBar?.show() @@ -191,7 +191,7 @@ class Window: NSWindow, NSWindowDelegate { func windowDidExitFullScreen(_ notification: Notification) { guard let tScreen = targetScreen else { return } isInFullscreen = false - cocoaCB.flagEvents(VO_EVENT_FULLSCREEN_STATE) + cocoaCB.mpv?.setConfigProperty(fullscreen: isInFullscreen) endAnimation(calculateWindowPosition(for: tScreen, withoutBounds: targetScreen == screen)) cocoaCB.view?.layerContentsPlacement = .scaleProportionallyToFit } @@ -474,11 +474,11 @@ class Window: NSWindow, NSWindowDelegate { } func windowDidMiniaturize(_ notification: Notification) { - cocoaCB.flagEvents(VO_EVENT_WIN_STATE) + cocoaCB.mpv?.setConfigProperty(minimized: true) } func windowDidDeminiaturize(_ notification: Notification) { - cocoaCB.flagEvents(VO_EVENT_WIN_STATE) + cocoaCB.mpv?.setConfigProperty(minimized: false) } func windowDidResignKey(_ notification: Notification) { |