mirror of https://github.com/mpv-player/mpv
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
|
backing:NSBackingStoreBuffered
|
||||||
defer:NO];
|
defer:NO];
|
||||||
|
|
||||||
|
[window setDelegate:self];
|
||||||
[window setContentView:self];
|
[window setContentView:self];
|
||||||
[window setInitialFirstResponder:self];
|
[window setInitialFirstResponder:self];
|
||||||
[window setAcceptsMouseMovedEvents:YES];
|
[window setAcceptsMouseMovedEvents:YES];
|
||||||
|
@ -665,4 +666,9 @@ static uint32_t control(uint32_t request, void *data, ...)
|
||||||
{
|
{
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
@end
|
|
||||||
|
- (void)windowWillClose:(NSNotification *)aNotification
|
||||||
|
{
|
||||||
|
mplayer_put_key(KEY_ESC);
|
||||||
|
}
|
||||||
|
@end
|
||||||
|
|
Loading…
Reference in New Issue