After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 614698 - Lightsoff misinterprets clicks if mouse is moving
Lightsoff misinterprets clicks if mouse is moving
Status: RESOLVED FIXED
Product: gnome-games-superseded
Classification: Deprecated
Component: lightsoff
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GNOME Games maintainers
Robert Carr
Depends on:
Blocks:
 
 
Reported: 2010-04-02 23:24 UTC by Justin Blanchard
Modified: 2010-05-08 04:28 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Justin Blanchard 2010-04-02 23:24:40 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.
Comment 1 Tim Horton 2010-04-03 02:08:38 UTC
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).
Comment 2 Justin Blanchard 2010-04-03 03:25:10 UTC
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
Comment 3 Tim Horton 2010-04-03 03:27:02 UTC
> IOW it seems that the app is polling mouse x&y coords manually in the click
> event handler, with nasty side effects.


*whoops*
Comment 4 Justin Blanchard 2010-04-03 04:44:45 UTC
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.