title: SDL_PeepEvents won't handle window close
body: <p>I am calling <code>SDL_PeepEvents( sdlevent, EVENT_BUFFER_SIZE, SDL_GETEVENT, SDL_FIRSTEVENT, SDL_SYSWMEVENT );</code> however after a few seconds of runtime and mucking around with the window (resizing/moving/minimizing) it won't pick up an event when the x is clicked to close window.</p>
  
  <pre><code>void Window::pollWindowEvents(  )
  {
      const int EVENT_BUFFER_SIZE = 16;
      SDL_Event sdlevent[ EVENT_BUFFER_SIZE ];    //The SDL event that we will poll to get events.
  
      SDL_PumpEvents(  );
      int numEvents = SDL_PeepEvents( sdlevent, EVENT_BUFFER_SIZE, SDL_GETEVENT, SDL_FIRSTEVENT, SDL_SYSWMEVENT );
  
      std::cout &lt;&lt; numEvents &lt;&lt; std::endl;
  
      for ( int i = 0; i &lt; numEvents; ++i )
      {
          switch ( sdlevent[ i ].type )
          {
          case SDL_QUIT:
              closed = true;
              std::cout &lt;&lt; sdlevent[ i ].type &lt;&lt; std::endl;
              break;
          default:
              std::cout &lt;&lt; sdlevent[ i ].type &lt;&lt; std::endl;
              break;
          };
      }
  }
  </code></pre>
  
  <p>Does anyone know what I'm doing wrong?</p>