Author: manolo
Date: 2010-12-01 10:31:23 -0800 (Wed, 01 Dec 2010)
New Revision: 7934
Log:
Should fix STR #2464 by not calling fl_open_display when running fluid in
command line mode
Modified:
branches/branch-1.3/fluid/fluid.cxx
branches/branch-1.3/src/Fl_cocoa.mm
Modified: branches/branch-1.3/fluid/fluid.cxx
===================================================================
--- branches/branch-1.3/fluid/fluid.cxx 2010-12-01 17:48:59 UTC (rev 7933)
+++ branches/branch-1.3/fluid/fluid.cxx 2010-12-01 18:31:23 UTC (rev 7934)
@@ -2352,12 +2352,12 @@
make_main_window();
-#ifdef __APPLE__
- fl_open_callback(apple_open_cb);
-#endif // __APPLE__
if (c) set_filename(c);
if (!compile_only) {
+#ifdef __APPLE__
+ fl_open_callback(apple_open_cb);
+#endif // __APPLE__
Fl::visual((Fl_Mode)(FL_DOUBLE|FL_INDEX));
Fl_File_Icon::load_system_icons();
main_window->callback(exit_cb);
Modified: branches/branch-1.3/src/Fl_cocoa.mm
===================================================================
--- branches/branch-1.3/src/Fl_cocoa.mm 2010-12-01 17:48:59 UTC (rev 7933)
+++ branches/branch-1.3/src/Fl_cocoa.mm 2010-12-01 18:31:23 UTC (rev 7934)
@@ -1447,12 +1447,14 @@
// Gets the border sizes and the titlebar size
static void get_window_frame_sizes(int &bx, int &by, int &bt) {
- fl_open_display();
+ NSAutoreleasePool *localPool;
+ localPool = [[NSAutoreleasePool alloc] init];
NSRect inside = { {20,20}, {100,100} };
NSRect outside = [NSWindow frameRectForContentRect:inside
styleMask:NSTitledWindowMask];
bx = int(outside.origin.x - inside.origin.x);
by = int(outside.origin.y - inside.origin.y);
bt = int(outside.size.height - inside.size.height - by);
+ [localPool release];
}
/*
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit