# HG changeset patch # User nplourde # Date 1115044816 0 # Node ID 5bd11a72dc58ed314d321fa745801412804f2391 # Parent 255559075b28ab8ca328c5d7d05cd892c523dc89 close button exit mplayer with esc key diff -r 255559075b28 -r 5bd11a72dc58 libvo/vo_macosx.m --- a/libvo/vo_macosx.m Mon May 02 14:00:52 2005 +0000 +++ b/libvo/vo_macosx.m Mon May 02 14:40:16 2005 +0000 @@ -306,6 +306,7 @@ backing:NSBackingStoreBuffered defer:NO]; + [window setDelegate:self]; [window setContentView:self]; [window setInitialFirstResponder:self]; [window setAcceptsMouseMovedEvents:YES]; @@ -665,4 +666,9 @@ { return YES; } -@end \ No newline at end of file + +- (void)windowWillClose:(NSNotification *)aNotification +{ + mplayer_put_key(KEY_ESC); +} +@end