diff options
author | der richter <der.richter@gmx.de> | 2020-09-15 16:24:36 +0200 |
---|---|---|
committer | der richter <der.richter@gmx.de> | 2020-09-20 15:28:50 +0200 |
commit | e28724d90d9d62c01c13d7da8ff2f10b490fc8ae (patch) | |
tree | 5435c6ccf646a50e28bac89620013f9834c4a3bd /video/out | |
parent | 3054bcc62c04f8d360aba3c6f24982e78b25bcb0 (diff) | |
download | mpv-e28724d90d9d62c01c13d7da8ff2f10b490fc8ae.tar.bz2 mpv-e28724d90d9d62c01c13d7da8ff2f10b490fc8ae.tar.xz |
mac: add ontop window level for desktop
this puts the window ontop of the desktop but behind the desktop icons.
Fixes #7791
Diffstat (limited to 'video/out')
-rw-r--r-- | video/out/mac/window.swift | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/video/out/mac/window.swift b/video/out/mac/window.swift index 5b7e77dcff..d692d0db91 100644 --- a/video/out/mac/window.swift +++ b/video/out/mac/window.swift @@ -262,6 +262,8 @@ class Window: NSWindow, NSWindowDelegate { level = .floating case -2: level = .statusBar + 1 + case -3: + level = NSWindow.Level(Int(CGWindowLevelForKey(.desktopWindow))) default: level = NSWindow.Level(ontopLevel) } @@ -416,7 +418,9 @@ class Window: NSWindow, NSWindowDelegate { } override func constrainFrameRect(_ frameRect: NSRect, to tScreen: NSScreen?) -> NSRect { - if (isAnimating && !isInFullscreen) || (!isAnimating && isInFullscreen) { + if (isAnimating && !isInFullscreen) || (!isAnimating && isInFullscreen || + level == NSWindow.Level(Int(CGWindowLevelForKey(.desktopWindow)))) + { return frameRect } |