summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authornplourde <nplourde@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-05-02 14:40:16 +0000
committernplourde <nplourde@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-05-02 14:40:16 +0000
commitd07fabd85fa281a750a920efc5afb5532912270b (patch)
treebc323d102e9e85b57848eeadd79d4183471ecfcd /libvo
parent86e49b65ede20a9f5a23a0823ff4e36f213a2d91 (diff)
downloadmpv-d07fabd85fa281a750a920efc5afb5532912270b.tar.bz2
mpv-d07fabd85fa281a750a920efc5afb5532912270b.tar.xz
close button exit mplayer with esc key
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15326 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/vo_macosx.m8
1 files changed, 7 insertions, 1 deletions
diff --git a/libvo/vo_macosx.m b/libvo/vo_macosx.m
index dc669c510c..3a9e746ab8 100644
--- a/libvo/vo_macosx.m
+++ b/libvo/vo_macosx.m
@@ -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 \ No newline at end of file
+
+- (void)windowWillClose:(NSNotification *)aNotification
+{
+ mplayer_put_key(KEY_ESC);
+}
+@end