summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorRyan Goulden <percontation@gmail.com>2014-03-25 19:01:51 +0100
committerStefano Pigozzi <stefano.pigozzi@gmail.com>2014-04-28 21:32:58 +0200
commit80ec0bac432bb9a059c6d305ed3b6eed1ad08869 (patch)
tree375cf5588538ab09d9098f4f4b3849f5fb1c2a10 /video
parent4d8489efae382474e963612a82048116a9ac6fa8 (diff)
downloadmpv-80ec0bac432bb9a059c6d305ed3b6eed1ad08869.tar.bz2
mpv-80ec0bac432bb9a059c6d305ed3b6eed1ad08869.tar.xz
cocoa: move sync section assignments in vo_control
Diffstat (limited to 'video')
-rw-r--r--video/out/cocoa_common.m8
1 files changed, 4 insertions, 4 deletions
diff --git a/video/out/cocoa_common.m b/video/out/cocoa_common.m
index 3a00cb9131..d947eee525 100644
--- a/video/out/cocoa_common.m
+++ b/video/out/cocoa_common.m
@@ -682,22 +682,22 @@ int vo_cocoa_control(struct vo *vo, int *events, int request, void *arg)
return VO_TRUE;
case VOCTRL_GET_WINDOW_SIZE: {
int *s = arg;
- vo->cocoa->inside_sync_section = true;
dispatch_sync(dispatch_get_main_queue(), ^{
+ vo->cocoa->inside_sync_section = true;
NSSize size = [vo->cocoa->view frame].size;
s[0] = size.width;
s[1] = size.height;
+ vo->cocoa->inside_sync_section = false;
});
- vo->cocoa->inside_sync_section = false;
return VO_TRUE;
}
case VOCTRL_SET_WINDOW_SIZE: {
- vo->cocoa->inside_sync_section = true;
dispatch_sync(dispatch_get_main_queue(), ^{
+ vo->cocoa->inside_sync_section = true;
int *s = arg;
[vo->cocoa->window queueNewVideoSize:NSMakeSize(s[0], s[1])];
+ vo->cocoa->inside_sync_section = false;
});
- vo->cocoa->inside_sync_section = false;
return VO_TRUE;
}
case VOCTRL_SET_CURSOR_VISIBILITY: