diff --git a/src/SFML/Window/Window.cpp b/src/SFML/Window/Window.cpp index d8ea5274..7a775fa8 100644 --- a/src/SFML/Window/Window.cpp +++ b/src/SFML/Window/Window.cpp @@ -401,7 +401,14 @@ void Window::OnResize() //////////////////////////////////////////////////////////// bool Window::FilterEvent(const Event& event) { - // Discard MouseMove events generated by SetCursorPosition + // Notify the input object + myInput.OnEvent(event); + + // Notify resize events to the derived class + if (event.Type == Event::Resized) + OnResize(); + + // Don't forward to the user MouseMove events generated by SetCursorPosition if ((event.Type == Event::MouseMoved) && (event.MouseMove.X == mySetCursorPosX) && (event.MouseMove.Y == mySetCursorPosY)) @@ -411,13 +418,6 @@ bool Window::FilterEvent(const Event& event) return false; } - // Notify resize events to the derived class - if (event.Type == Event::Resized) - OnResize(); - - // Notify the input object - myInput.OnEvent(event); - return true; }