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:
nplourde 2005-05-02 14:40:16 +00:00
parent 86e49b65ed
commit d07fabd85f
1 changed files with 7 additions and 1 deletions

View File

@ -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