title: C++ SFML mouse movement
body: <p>I'm trying to detect mouse movement event and move it back to the middle of the screen using sf::RenderWindow pollEvent method and detect the event type sf::Event::MousePressed. The problem is when I'm detecing the mouse movment I need to move the mouse back to the middle of the screen and for that im using sf::Mouse::setPosition but I think (maybe I'm wrong) that function itself calling sf::Event::MouseMoved when it used, and im afraid it creates an infinite loop.</p>
  
  <p>Exmaple of the way im doing that: (I know 0, 0 it's not the middle it is just and exmaple)</p>
  
  <pre><code>while (app.pollEvent(Event))
  {
    if(Event.type == sf::Event::MouseMoved)
          {
              sf::Mouse::setPosition(0 , 0));
          }
  }
  </code></pre>
  
  <p>Sorry for my bad english!
  Thanks in advance!</p>