mirror of
https://github.com/mpv-player/mpv
synced 2025-01-04 14:12:10 +00:00
cocoa: fix unwanted behavior with window level other than the default
setting a window level other than NSNormalWindowLevel always sets NSWindowCollectionBehaviorTransient, which prevents certain things to work properly. examples are automatic switching to the active Space when mpv is made active and (de-)miniaturizing. latter always lead to a vanishing window. Fixes #1757 #1884
This commit is contained in:
parent
bed94df521
commit
954625c165
@ -478,8 +478,10 @@ static void vo_set_level(struct vo *vo, int ontop)
|
||||
s->window_level = NSNormalWindowLevel;
|
||||
}
|
||||
|
||||
[[s->view window] setLevel:s->window_level];
|
||||
[s->window setLevel:s->window_level];
|
||||
[s->window setLevel:s->window_level];
|
||||
NSWindowCollectionBehavior behavior = [s->window collectionBehavior] &
|
||||
~NSWindowCollectionBehaviorTransient;
|
||||
[s->window setCollectionBehavior:behavior|NSWindowCollectionBehaviorManaged];
|
||||
}
|
||||
|
||||
static int vo_cocoa_ontop(struct vo *vo)
|
||||
|
Loading…
Reference in New Issue
Block a user