Ok, here is the sourcecode of a program that reproduces the problem:
#include <SFML/Graphics.hpp>
int main()
{
sf::RenderWindow App(sf::VideoMode(600,300,32), "Test");
sf::Event Event;
sf::Image img(10,10,sf::Color());
sf::Sprite Spr;
bool running=true;
bool jumping=false;
short jumpenergy=0;
App.SetFramerateLimit(40);
App.UseVerticalSync(true);
img.SetSmooth(false);
Spr.SetImage(img);
Spr.SetCenter(5,5);
Spr.SetScale(2,2);
Spr.SetPosition(200,290);
while(running)
{
while(App.GetEvent(Event))
{
if(Event.Type==sf::Event::Closed)
running=false;
if(Event.Type==sf::Event::KeyPressed){
if(Event.Key.Code==sf::Key::Escape)running=false;
if(Event.Key.Code==sf::Key::Up && !jumping){jumping=true;jumpenergy=15;}
}
if(App.GetInput().IsKeyDown(sf::Key::Left))Spr.Move(-10,0);
if(App.GetInput().IsKeyDown(sf::Key::Right))Spr.Move(10,0);
if(Spr.GetPosition().x<-5) Spr.SetX(600); else if(Spr.GetPosition().x>605) Spr.SetX(0);
}
if(jumping){if(jumpenergy>-16){Spr.SetY(Spr.GetPosition().y-jumpenergy);jumpenergy--;}
else jumping=!jumping;}
App.Clear(sf::Color(0,150,0));
App.Draw(Spr);
App.Display();
}
}
PS:strangely, if i move the mouse over the application while is moving/jumping, it works just how i want to