From 16f8dec90233d83e0a1f7f4173f4c0ecf49d917a Mon Sep 17 00:00:00 2001 From: Gabor Gyorvari Date: Sun, 19 Oct 2014 20:21:11 +0200 Subject: [PATCH] fltk build fix Fixes #29988 and #33093 Tested with tiger-vnc which is used by fltk --- Library/Formula/fltk.rb | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/Library/Formula/fltk.rb b/Library/Formula/fltk.rb index 45a4bfc7a2c0..3290a161ad68 100644 --- a/Library/Formula/fltk.rb +++ b/Library/Formula/fltk.rb @@ -58,3 +58,26 @@ class Fl_Type { + friend Fl_Widget *make_type_browser(int,int,int,int,const char *); friend class Fl_Window_Type; virtual void setlabel(const char *); // virtual part of label(char*) + +diff --git a/src/Fl_cocoa.mm.o b/src/Fl_cocoa.mm +index 1234567..1234567 100644 +--- a/src/Fl_cocoa.mm ++++ b/src/Fl_cocoa.mm +@@ -1322,7 +1322,7 @@ + if (need_new_nsapp) [NSApplication sharedApplication]; + NSAutoreleasePool *localPool; + localPool = [[NSAutoreleasePool alloc] init]; // never released +- [NSApp setDelegate:[[FLDelegate alloc] init]]; ++ [(NSApplication *)NSApp setDelegate:[[FLDelegate alloc] init]]; + if (need_new_nsapp) [NSApp finishLaunching]; + + // empty the event queue but keep system events for drag&drop of files at launch +@@ -2231,7 +2231,7 @@ + w->set_visible(); + if ( w->border() || (!w->modal() && !w->tooltip_window()) ) Fl::handle(FL_FOCUS, w); + Fl::first_window(w); +- [cw setDelegate:[NSApp delegate]]; ++ [(NSFileManager *)cw setDelegate:[NSApp delegate]]; + if (fl_show_iconic) { + fl_show_iconic = 0; + [cw miniaturize:nil];