summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorStefano Pigozzi <stefano.pigozzi@gmail.com>2013-10-12 20:57:28 +0200
committerStefano Pigozzi <stefano.pigozzi@gmail.com>2013-10-12 21:02:46 +0200
commit8d5f800567d81665820d308b7f2d482c18c51e15 (patch)
treebeb08eacb6dd4ce13cfaa7dfc7f0ceddf0d4c643 /video
parentf312528ebc6980a55e61089f6d5e891fe0b18067 (diff)
downloadmpv-8d5f800567d81665820d308b7f2d482c18c51e15.tar.bz2
mpv-8d5f800567d81665820d308b7f2d482c18c51e15.tar.xz
cocoa: make --ontop also cover dock+menubar
This only shows any differences when mpv isn't frontmost and is in fullscreen. Cmd+Tab overlay is still at a higher level as to avoid complete usability fail.
Diffstat (limited to 'video')
-rw-r--r--video/out/cocoa_common.m4
1 files changed, 3 insertions, 1 deletions
diff --git a/video/out/cocoa_common.m b/video/out/cocoa_common.m
index 9f03cd8d48..1c5c3a5e25 100644
--- a/video/out/cocoa_common.m
+++ b/video/out/cocoa_common.m
@@ -235,7 +235,9 @@ static void vo_set_level(struct vo *vo, int ontop)
{
struct vo_cocoa_state *s = vo->cocoa;
if (ontop) {
- s->window_level = NSNormalWindowLevel + 1;
+ // +1 is not enough as that will show the icon layer on top of the
+ // menubar when the application is not frontmost. so use +2
+ s->window_level = NSMainMenuWindowLevel + 2;
} else {
s->window_level = NSNormalWindowLevel;
}