SFML community forums

Help => Window => Topic started by: Imbue on October 28, 2008, 04:24:16 am

Title: Possible mouse input bug
Post by: Imbue on October 28, 2008, 04:24:16 am
With Windows and the SVN version of SFML I think I found a small bug.

If the mouse button is depressed inside the application window, but released outside it, then RenderWindow.GetInput().IsMouseButtonDown(sf::Mouse::Left) still returns true until the next click inside of the window.

I understand that (by design) you may want to ignore input outside of the application, but it seems wrong to falsely report the mouse state once it's hovering over the application again.

Thanks!
Title: Possible mouse input bug
Post by: Laurent on October 28, 2008, 07:57:51 am
This is a known issue, and there's a task in the roadmap to fix it ;)
Title: Possible mouse input bug
Post by: Imbue on October 28, 2008, 08:46:05 am
OK, great.

I did take a quick look through the road map, but I missed it. :oops: I'll look harder next time (looks like it's FS#12).

Anyway, sorry for bothering you with this.

Thanks!
Title: Possible mouse input bug
Post by: Laurent on October 28, 2008, 09:58:37 am
No problem, thanks for your feedback :)
Title: Possible mouse input bug
Post by: haydxn on October 28, 2008, 10:06:13 am
I presume this bug is related, but i'll mention it here anyway. Basically, if the mouse goes to the very left edge of the screen/window, as soon as you move away from it, testing for a right-click event will return true. This happens in both full-screen and windowed modes, and is with the 'stable' version (not svn).

If i get a moment after work I'll try to knock up a minimal app-code to demonstrate it, so we can see if it happens to anyone else. Not sure if it IS related though, due to it happening in full-screen, but y'never know.

[to clarify: move the pointer all the way to the left edge (as if to go past it<*>), then try to move it just one pixel to the right; this seems to trigger a right-mouse click event]

<*> this is why it looks like it might be related... but again, it happens in fullscreen so it's possible that something else is going on.