mirror of
https://github.com/mpv-player/mpv
synced 2025-01-05 03:06:28 +01:00
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:
parent
6db1ac87fc
commit
d612a71f39
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user