From 0937913a7c7e403e91498b59eabaa0fb895de34e Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Fri, 8 Apr 2011 16:14:05 +0000 Subject: Added missing test of necessity of fl_open_display() call. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8571 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_cocoa.mm | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index 07ecf5260..c88f73474 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -1386,6 +1386,7 @@ void fl_close_display() { // Gets the border sizes and the titlebar size static void get_window_frame_sizes(int &bx, int &by, int &bt) { + if (NSApp == nil) fl_open_display(); NSRect inside = { {20,20}, {100,100} }; NSRect outside = [NSWindow frameRectForContentRect:inside styleMask:NSTitledWindowMask]; bx = int(outside.origin.x - inside.origin.x); -- cgit v1.2.3