Placing NSWindow at top of screen without 1 pixel margin.
<p>I am trying to emulate the behaviour of a NSMenu using a NSWindow. However, when I tried anchoring the window just below the status item (at the top of the screen) I became aware that by default all windows have a 1 pixel margin between the top of the window and the status bar. Here is what I mean:
<a href="http://i.stack.imgur.com/HbB1E.png" rel="nofollow">NSWindow at top of screen with unintended margin</a></p>

<p>I have found an outdated implementation on github that manages to create a custom window below the status bar without this margin, but I am having a hard time figuring out how the implementation achieves this. <a href="https://github.com/SquaredTiki/JGMenuWindow" rel="nofollow">https://github.com/SquaredTiki/JGMenuWindow</a></p>

<p>How can I get rid of the margin so that the window fits snuggly against the status bar?</p>