vo_corevideo: change window-closing handling

Change window-closing handling so it works properly if the
KEY_CLOSE_WIN is rebound to e.g. skip to next file or not
bound at all.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31822 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2010-07-25 14:40:58 +00:00 committed by Uoti Urpala
parent 6db1ac87fc
commit d612a71f39
1 changed files with 5 additions and 2 deletions

View File

@ -1032,9 +1032,12 @@ static int control(uint32_t request, void *data)
return YES;
}
- (void)windowWillClose:(NSNotification *)aNotification
- (BOOL)windowShouldClose:(id)sender
{
mpGLView = NULL;
mplayer_put_key(KEY_CLOSE_WIN);
// We have to wait for MPlayer to handle this,
// otherwise we are in trouble if the
// KEY_CLOSE_WIN handler is disabled
return NO;
}
@end