mirror of
https://github.com/mpv-player/mpv
synced 2025-01-04 22:20:22 +00:00
close button exit mplayer with esc key
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15326 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
86e49b65ed
commit
d07fabd85f
@ -306,6 +306,7 @@ static uint32_t control(uint32_t request, void *data, ...)
|
||||
backing:NSBackingStoreBuffered
|
||||
defer:NO];
|
||||
|
||||
[window setDelegate:self];
|
||||
[window setContentView:self];
|
||||
[window setInitialFirstResponder:self];
|
||||
[window setAcceptsMouseMovedEvents:YES];
|
||||
@ -665,4 +666,9 @@ static uint32_t control(uint32_t request, void *data, ...)
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
@end
|
||||
|
||||
- (void)windowWillClose:(NSNotification *)aNotification
|
||||
{
|
||||
mplayer_put_key(KEY_ESC);
|
||||
}
|
||||
@end
|
||||
|
Loading…
Reference in New Issue
Block a user