From d612a71f397954ad77e9f05d01302dd002df45c8 Mon Sep 17 00:00:00 2001 From: reimar Date: Sun, 25 Jul 2010 14:40:58 +0000 Subject: 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 --- libvo/vo_corevideo.m | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'libvo/vo_corevideo.m') diff --git a/libvo/vo_corevideo.m b/libvo/vo_corevideo.m index 2e39a71195..218b095079 100644 --- a/libvo/vo_corevideo.m +++ b/libvo/vo_corevideo.m @@ -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 -- cgit v1.2.3