title: NSWindow Modal Problems
body: <p>I'm running a modal window in my application, which works fine. The problem however seems to be dismissing the window.</p>
  
  <p>While the window closes, it takes at least 20 seconds for the application to continue (I show the modal window at startup), but it will continue instantly if I click on its dock icon. </p>
  
  <p>Here's how I close the modal window:</p>
  
  <pre><code>[NSApp stopModal];
  [updaterWindow orderOut:self];
  [updaterWindow close]; 
  </code></pre>
  
  <p>I've tried various things to get the Application to continue faster, such as manually switching to the main run loop and speaking to the main window directly (asking it to become the key window), which all did not work. Same as before, 20 seconds wait or instant load when clicking on the dock icon.</p>
  
  <p>What can cause something like this? I'm really baffled.</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>My modal window is actually created in a really simple way. I run my window as modal:</p>
  
  <pre><code>[NSApp runModalForWindow:updaterWindow];
  </code></pre>
  
  <p>When I am done with things, I close it:</p>
  
  <pre><code>[NSApp stopModal];
  [updaterWindow orderOut:self];
  [updaterWindow close];
  </code></pre>
  
  <p>The window goes away, but it needs a click to the dock icon or anywhere on the screen for the app to continue.</p>