Mac OS: It is not necessary to open the display to send the

+[NSWindow  frameRectForContentRect:styleMask:] message
(checked on 10.11 and 10.3). Therefore fluid -c will run without
opening the display.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10979 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Manolo Gouy 2015-12-23 09:33:06 +00:00
parent 527d5943d0
commit 59823515cf

View File

@ -1868,7 +1868,6 @@ static void get_window_frame_sizes(int &bx, int &by, int &bt) {
static int top, left, bottom;
if (first) {
first = false;
if (NSApp == nil) fl_open_display();
NSRect inside = { {20,20}, {100,100} };
NSRect outside = [NSWindow frameRectForContentRect:inside styleMask:NSTitledWindowMask];
left = int(outside.origin.x - inside.origin.x);