diff options
author | Akemi <der.richter@gmx.de> | 2017-04-15 22:33:49 +0200 |
---|---|---|
committer | Akemi <der.richter@gmx.de> | 2017-04-17 02:45:26 +0200 |
commit | f7637db3775e6d744b061ba7a5ee615a25daa7ec (patch) | |
tree | ed51b317bc7d351d84580a997aeab6e7f753e834 /video/out | |
parent | bba08e38ff9842c4edf9da6a1d54066a01acd982 (diff) | |
download | mpv-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')
-rw-r--r-- | video/out/cocoa_common.m | 3 |
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; |