Should fix STR #2464 by not calling fl_open_display when running fluid in command line mode
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7934 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
bbb273cb3a
commit
2f8b7e47c2
@ -2352,12 +2352,12 @@ int main(int argc,char **argv) {
|
||||
|
||||
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);
|
||||
|
||||
@ -1447,12 +1447,14 @@ void fl_close_display() {
|
||||
|
||||
// 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];
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Loading…
Reference in New Issue
Block a user