summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorStefano Pigozzi <stefano.pigozzi@gmail.com>2013-05-16 23:46:31 +0200
committerStefano Pigozzi <stefano.pigozzi@gmail.com>2013-05-16 23:46:31 +0200
commitf9ed43077f2878420268bdf8aec23b2688a168c0 (patch)
tree2fa3473b75ede8d9c4cbe805ff86272eff2df06e /video
parent2958ae39cadbbaeb01277b8456ca2c7a4274cbd7 (diff)
downloadmpv-f9ed43077f2878420268bdf8aec23b2688a168c0.tar.bz2
mpv-f9ed43077f2878420268bdf8aec23b2688a168c0.tar.xz
cocoa_common: vo_corevideo: fix window initialization
vo_corevideo doesn't create a hidden window to perform OpenGL extensions detection. This caused the window to always stay close.
Diffstat (limited to 'video')
-rw-r--r--video/out/cocoa_common.m10
1 files changed, 5 insertions, 5 deletions
diff --git a/video/out/cocoa_common.m b/video/out/cocoa_common.m
index 894c6eed22..a4b816b094 100644
--- a/video/out/cocoa_common.m
+++ b/video/out/cocoa_common.m
@@ -168,7 +168,7 @@ struct vo_cocoa_state {
int display_cursor;
int cursor_timer;
int vo_cursor_autohide_delay;
- int last_hidden_config;
+ bool will_make_front;
bool did_resize;
bool did_async_resize;
@@ -201,7 +201,7 @@ static struct vo_cocoa_state *vo_cocoa_init_state(struct vo *vo)
.out_fs_resize = NO,
.display_cursor = 1,
.vo_cursor_autohide_delay = vo->opts->cursor_autohide_delay,
- .last_hidden_config = -1,
+ .will_make_front = YES,
.power_mgmt_assertion = kIOPMNullAssertionID,
.accumulated_scroll = 0,
.lock = [[NSLock alloc] init],
@@ -529,11 +529,11 @@ int vo_cocoa_config_window(struct vo *vo, uint32_t d_width,
[s->window setFrameOrigin:NSMakePoint(vo->dx, vo->dy)];
+
if (flags & VOFLAG_HIDDEN) {
[s->window orderOut:nil];
- s->last_hidden_config = vo->config_count;
- } else if (![s->window isVisible] &&
- s->last_hidden_config == vo->config_count) {
+ } else if (![s->window isVisible] && s->will_make_front) {
+ s->will_make_front = NO;
[s->window makeKeyAndOrderFront:nil];
[NSApp activateIgnoringOtherApps:YES];
}