1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-11 09:25:56 +00:00

cocoa: fix minimized state getter

This commit is contained in:
Stefano Pigozzi 2015-03-09 12:00:37 +01:00
parent b7f242dfcf
commit 735bf48496

View File

@ -746,11 +746,8 @@ int vo_cocoa_control(struct vo *vo, int *events, int request, void *arg)
}
case VOCTRL_GET_WIN_STATE: {
with_cocoa_lock(vo->cocoa, ^{
if ([[vo->cocoa->view window] isMiniaturized]) {
*(int *)arg |= VO_WIN_STATE_MINIMIZED;
} else {
*(int *)arg = 0;
}
const bool minimized = [[vo->cocoa->view window] isMiniaturized];
*(int *)arg = minimized ? VO_WIN_STATE_MINIMIZED : 0;
});
return VO_TRUE;
}