gl/cocoa: Fix for building on Mac OS X 10.10

Using NSApp directly seems to confuse something, as the compiler
was expecting an id<NSFileManagerDelegate>. Switched to using
[NSApplication sharedApplication], and specified the delegate
protocol on the window class as well.

https://bugzilla.gnome.org/show_bug.cgi?id=738740
This commit is contained in:
Brion Vibber 2014-10-17 21:26:52 -07:00 committed by Sebastian Dröge
parent ad649138aa
commit 88b19bcf99

View file

@ -33,7 +33,7 @@
/* */
/* =============================================================*/
@interface GstGLNSWindow: NSWindow {
@interface GstGLNSWindow: NSWindow <NSApplicationDelegate> {
BOOL m_isClosed;
GstGLWindowCocoa *window_cocoa;
}
@ -138,7 +138,7 @@ gst_gl_window_cocoa_create_window (GstGLWindowCocoa *window_cocoa, NSRect rect)
GST_DEBUG ("NSWindow id: %"G_GUINTPTR_FORMAT, (guintptr) priv->internal_win_id);
[NSApp setDelegate: priv->internal_win_id];
[[NSApplication sharedApplication] setDelegate: priv->internal_win_id];
return TRUE;
}