I think the problem is in the way we create the window:
frame = [NSWindow frameRectForContentRect:[view frame]
styleMask:m];
window = [[NSWindow alloc] initWithContentRect:frame
styleMask:m
backing: NSBackingStoreBuffered
defer:NO];
This adds the window border twice! In the window creation we should
use [view frame] instead of frame. The frame is later used to set the
min and max size of the window. We could get that value from the
window itself there, which should be more accurate.
The interesting question is why GNUstep displays the window as
expected. Most likely the size restrictions are the reason for that.