summaryrefslogtreecommitdiffstats
path: root/video/out/cocoa_common.m
diff options
context:
space:
mode:
authorAkemi <der.richter@gmx.de>2017-04-15 22:33:49 +0200
committerAkemi <der.richter@gmx.de>2017-04-17 02:45:26 +0200
commitf7637db3775e6d744b061ba7a5ee615a25daa7ec (patch)
treeed51b317bc7d351d84580a997aeab6e7f753e834 /video/out/cocoa_common.m
parentbba08e38ff9842c4edf9da6a1d54066a01acd982 (diff)
downloadmpv-f7637db3775e6d744b061ba7a5ee615a25daa7ec.tar.bz2
mpv-f7637db3775e6d744b061ba7a5ee615a25daa7ec.tar.xz
cocoa: fix retrieval of unfs window size while animating
due to the System inherent fullscreen animation the option and the actual fullscreen state can be out of sync, leading to a wrongly reported unfs window size in the time of the animation. just always fall back to the window size, we keep track of, when we either are in fullscreen or are currently switching to it. Fixes #4323
Diffstat (limited to 'video/out/cocoa_common.m')
-rw-r--r--video/out/cocoa_common.m3
1 files changed, 2 insertions, 1 deletions
diff --git a/video/out/cocoa_common.m b/video/out/cocoa_common.m
index 4db1ac2371..14a96c46d8 100644
--- a/video/out/cocoa_common.m
+++ b/video/out/cocoa_common.m
@@ -847,7 +847,8 @@ static int vo_cocoa_control_on_main_thread(struct vo *vo, int request, void *arg
return vo_cocoa_window_border(vo);
case VOCTRL_GET_UNFS_WINDOW_SIZE: {
int *sz = arg;
- NSRect rect = s->fullscreen ? s->unfs_window : [s->view frame];
+ NSRect rect = (s->fullscreen || vo->opts->fullscreen) ?
+ s->unfs_window : [s->view frame];
if(!vo->opts->hidpi_window_scale)
rect = [s->current_screen convertRectToBacking:rect];
sz[0] = rect.size.width;