mirror of
https://github.com/fltk/fltk.git
synced 2026-06-04 23:42:15 +08:00
Avoid possible autorelease warning message sent by "fluid -c" that calls Fl_Window::size_range()
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11992 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
+4
-4
@@ -1824,15 +1824,15 @@ void Fl_Cocoa_Screen_Driver::disable_im() {
|
||||
|
||||
// Gets the border sizes and the titlebar size
|
||||
static void get_window_frame_sizes(int &bx, int &by, int &bt) {
|
||||
static bool first = true;
|
||||
static int top, left, bottom;
|
||||
if (first) {
|
||||
first = false;
|
||||
static int top = 0, left, bottom;
|
||||
if (!top) {
|
||||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
||||
NSRect inside = { {20,20}, {100,100} };
|
||||
NSRect outside = [NSWindow frameRectForContentRect:inside styleMask:NSTitledWindowMask];
|
||||
left = int(outside.origin.x - inside.origin.x);
|
||||
bottom = int(outside.origin.y - inside.origin.y);
|
||||
top = int(outside.size.height - inside.size.height) - bottom;
|
||||
[pool release];
|
||||
}
|
||||
bx = left;
|
||||
by = bottom;
|
||||
|
||||
Reference in New Issue
Block a user