GNOME Bugzilla – Bug 614698
Lightsoff misinterprets clicks if mouse is moving
Last modified: 2010-05-08 04:28:15 UTC
If I click while moving the mouse quickly (e.g. if I know the 4 moves to the solution), lightsoff will often register a click in a place where the mouse has moved after I made the click. This is very frustrating. I don't know whether the bug is in the app or one of its dependencies. Lights Off 1.0 Seed 2.30.0 clutter-git svn @20100401 clutter-gtk-git svn @20100401 Thank you.
Is it when the *mouse* is moving quickly, or when you're clicking before the animation is complete? I think I've run into the latter many times during development, but I'm not sure what the correct thing to do is (right now clicks are registered on the moving buttons, not in the location the buttons *will* be, which is harder).
This may be harder to reproduce on a system where seed / the app rarely lags noticeably. Anyway, to reproduce, I: 1. click on a square 2. if animation starts immediately, wait & go back to step 1 3. immediately move the pointer over a different square than the one you clicked Result: the button you're hovering over is pressed, rather than the one you clicked. IOW it seems that the app is polling mouse x&y coords manually in the click event handler, with nasty side effects. These steps seem to work 90% of the time or more on my laptop (which is a modest Turion64 x2 but not a dinosaur). Best, Justin
> IOW it seems that the app is polling mouse x&y coords manually in the click > event handler, with nasty side effects. *whoops*
OK, that wasn't accurate. I think it's a combination of two things: Lightsoff connects to button_release_event to get its clicks. GTK seems to send "delayed" button release events. (bug in GTK? Or even X?) Maybe it's not the best fix possible, but I changed button_release_event to button_press_event in Board.js and I'm very happy with the result.