Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Possible mouse input bug  (Read 3882 times)

0 Members and 1 Guest are viewing this topic.

Imbue

  • Full Member
  • ***
  • Posts: 104
    • View Profile
Possible mouse input bug
« 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!

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Possible mouse input bug
« Reply #1 on: October 28, 2008, 07:57:51 am »
This is a known issue, and there's a task in the roadmap to fix it ;)
Laurent Gomila - SFML developer

Imbue

  • Full Member
  • ***
  • Posts: 104
    • View Profile
Possible mouse input bug
« Reply #2 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!

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Possible mouse input bug
« Reply #3 on: October 28, 2008, 09:58:37 am »
No problem, thanks for your feedback :)
Laurent Gomila - SFML developer

haydxn

  • Newbie
  • *
  • Posts: 5
    • View Profile
Possible mouse input bug
« Reply #4 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.

 

anything