From 735bf484965bbc935374b9014acd7a39000f4fa1 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Mon, 9 Mar 2015 12:00:37 +0100 Subject: [PATCH] cocoa: fix minimized state getter --- video/out/cocoa_common.m | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/video/out/cocoa_common.m b/video/out/cocoa_common.m index a1d2ac5e60..0b861b5b11 100644 --- a/video/out/cocoa_common.m +++ b/video/out/cocoa_common.m @@ -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; }