Author: manolo
Date: 2011-11-23 01:54:16 -0800 (Wed, 23 Nov 2011)
New Revision: 9186
Log:
Propagated changes from 1.3
Modified:
branches/branch-3.0/src/fltk3/cocoa.mm
Modified: branches/branch-3.0/src/fltk3/cocoa.mm
===================================================================
--- branches/branch-3.0/src/fltk3/cocoa.mm 2011-11-23 09:19:39 UTC (rev
9185)
+++ branches/branch-3.0/src/fltk3/cocoa.mm 2011-11-23 09:54:16 UTC (rev
9186)
@@ -567,7 +567,6 @@
contentRect:(NSRect)rect
styleMask:(NSUInteger)windowStyle;
- (fltk3::Window *)getFl_Window;
-- (BOOL)windowShouldClose:(FLWindow *)w;
- (BOOL)containsGLsubwindow;
- (void)setContainsGLsubwindow:(BOOL)contains;
@end
@@ -588,18 +587,6 @@
{
return w;
}
-- (BOOL)windowShouldClose:(FLWindow *)fl
-{
- fl_lock_function();
- fltk3::Window *to_close = [fl getFl_Window];
- fltk3::handle( fltk3::CLOSE, to_close ); // this might or might not close
the window
- fltk3::do_widget_deletion();
- if (!Fl_X::first) return YES;
- fltk3::Window *l = fltk3::first_window();
- while( l != NULL && l != to_close) l = fltk3::next_window(l);
- fl_unlock_function();
- return (l == NULL ? YES : NO);
-}
- (BOOL)containsGLsubwindow
{
return containsGLsubwindow;
@@ -919,6 +906,7 @@
- (void)windowDidBecomeMain:(NSNotification *)notif;
- (void)windowDidDeminiaturize:(NSNotification *)notif;
- (void)windowDidMiniaturize:(NSNotification *)notif;
+- (BOOL)windowShouldClose:(id)fl;
- (void)anyWindowWillClose:(NSNotification *)notif;
-
(NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication*)sender;
- (void)applicationDidBecomeActive:(NSNotification *)notify;
@@ -1007,6 +995,13 @@
fltk3::handle(fltk3::HIDE, window);
fl_unlock_function();
}
+- (BOOL)windowShouldClose:(id)fl
+{
+ fl_lock_function();
+ fltk3::handle( fltk3::CLOSE, [fl getFl_Window] ); // this might or might not
close the window
+ fl_unlock_function();
+ return NO; // the system doesn't need to send [fl close] because FLTK does
it when needed
+}
- (void)anyWindowWillClose:(NSNotification *)notif
{
fl_lock_function();
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit