recently noticed that sometimes MouseLeft event is not generated when the mouse button is pressed
Windows 7, VS2010 debug/release
to reproduce :
1. set a breakpoint
2. press left mouse button and move the mouse out of the window (fast, cant reproduse while moving mouse slowly)
In that case event is generated when you release the button.
code:
sf::RenderWindow win(sf::VideoMode(1024, 768), "Show", sf::Style::Close);
while (win.isOpen()) {
sf::Event event;
while (win.pollEvent(event)) {
if (event.type == sf::Event::MouseLeft) {
int setBreakpointHere = 0;
setBreakpointHere ++;
}
if (event.type == sf::Event::Closed) {
win.close();
}
}
win.clear();
win.display();
}
posible workaround :
http://www.gamedev.net/topic/191870-wm_mouseleave-problem/