mac: make ontop level runtime changeable

this was requested on an old issue, but the comment has since been
deleted. i though it was useful enough to add it. it's also just a one
line change.
This commit is contained in:
der richter 2020-07-26 13:42:25 +02:00
parent fa982a7cbe
commit 9035a51b13
1 changed files with 2 additions and 1 deletions

View File

@ -453,7 +453,8 @@ class Common: NSObject {
self.window?.toggleFullScreen(nil)
}
}
if opt == UnsafeMutableRawPointer(&mpv.optsPtr.pointee.ontop) {
if opt == UnsafeMutableRawPointer(&mpv.optsPtr.pointee.ontop) ||
opt == UnsafeMutableRawPointer(&mpv.optsPtr.pointee.ontop_level) {
DispatchQueue.main.async {
self.window?.setOnTop(Bool(mpv.opts.ontop), Int(mpv.opts.ontop_level))
}