Author: manolo
Date: 2011-04-08 09:14:05 -0700 (Fri, 08 Apr 2011)
New Revision: 8571
Log:
Added missing test of necessity of fl_open_display() call.

Modified:
   branches/branch-1.3/src/Fl_cocoa.mm

Modified: branches/branch-1.3/src/Fl_cocoa.mm
===================================================================
--- branches/branch-1.3/src/Fl_cocoa.mm 2011-04-07 09:28:45 UTC (rev 8570)
+++ branches/branch-1.3/src/Fl_cocoa.mm 2011-04-08 16:14:05 UTC (rev 8571)
@@ -1386,6 +1386,7 @@
 
 // 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);

_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit

Reply via email to