From c2eca2e4b7320324c1c1d78d432dc6358fa860c2 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sun, 12 Oct 2014 00:17:48 +0200 Subject: 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! --- video/out/cocoa/events_view.m | 1 + 1 file changed, 1 insertion(+) (limited to 'video/out/cocoa/events_view.m') 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; } -- cgit v1.2.3