diff options
author | Stefano Pigozzi <stefano.pigozzi@gmail.com> | 2014-10-12 00:17:48 +0200 |
---|---|---|
committer | Stefano Pigozzi <stefano.pigozzi@gmail.com> | 2014-10-12 00:19:44 +0200 |
commit | c2eca2e4b7320324c1c1d78d432dc6358fa860c2 (patch) | |
tree | ddcc54737c78deb9275ee6650759d326e4177e11 /video/out/cocoa | |
parent | 8b6b84f36b00f06e6879db9c3bc9d171afa57cd7 (diff) | |
download | mpv-c2eca2e4b7320324c1c1d78d432dc6358fa860c2.tar.bz2 mpv-c2eca2e4b7320324c1c1d78d432dc6358fa860c2.tar.xz |
libmpv/cocoa: allow clients to use mpv event system
This allows mpv's view to take key and send events to mpv's core.
To set key status correctly, clients must call -[NSWindow selectNextKeyView:]
during reconfig on the main thread. All is 'documented' in the cocoabasic
example.
If someone knows a better way to handle giving key to the embedded view,
let me know!
Diffstat (limited to 'video/out/cocoa')
-rw-r--r-- | video/out/cocoa/events_view.m | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/video/out/cocoa/events_view.m b/video/out/cocoa/events_view.m index cbc7223098..fd088cb5e6 100644 --- a/video/out/cocoa/events_view.m +++ b/video/out/cocoa/events_view.m @@ -43,6 +43,7 @@ if (self) { [self registerForDraggedTypes:@[NSFilenamesPboardType, NSURLPboardType]]; + [self setAutoresizingMask:NSViewWidthSizable|NSViewHeightSizable]; } return self; } |