1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-27 10:03:32 +00:00

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
This commit is contained in:
Akemi 2017-04-15 22:33:49 +02:00
parent bba08e38ff
commit f7637db377

View File

@ -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;