New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MouseMove event no more fired when mouse is pressed and goes out and in the window #277

Ceylo opened this Issue Sep 3, 2012 · 1 comment


None yet
2 participants

Ceylo commented Sep 3, 2012

Tested on OS X 10.8 with latest SFML git sources.

How to reproduce
Put the mouse cursor in the window, keep any mouse button pressed, move the mouse outside of the window and put back the mouse cursor inside the window without releasing the mouse button.

What's wrong
MouseMove events are fired before the mouse cursor leaves the window, but are no more fired when the cursor comes back on the window.

Sample code to test the issue

#include <SFML/System.hpp>
#include <SFML/Graphics.hpp>
#include <iostream>

int main (int argc, const char * argv[])
    sf::RenderWindow window(sf::VideoMode(800, 600), "SFML window");
    sf::Clock timer;

    while (window.isOpen())
        sf::Event event;
        while (window.pollEvent(event))
            if (event.type == sf::Event::Closed or
                (event.type == sf::Event::KeyPressed and event.key.code == sf::Keyboard::Escape))

            if (event.type == sf::Event::MouseMoved)
                std::cout << timer.getElapsedTime().asMicroseconds() << " : move" << std::endl;


    return EXIT_SUCCESS;

@ghost ghost assigned mantognini Sep 3, 2012


This comment has been minimized.

Show comment
Hide comment

mantognini Sep 4, 2012



It might also be linked to #213 somehow.


mantognini commented Sep 4, 2012


It might also be linked to #213 somehow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment