The API for NSWindow's creation has a contentRect parameter, but it seems to be handled like a frameRect. So convert from contentRect to frameRect first. Without this change the top 20-ish lines of the image are under the title bar.