I looked around in the mouse movement handler (which is called to update the selection rectangle when the arrow keys are pressed, and also for normal mouse movement) and discovered that it assigns the "last state of the mouse buttons" variable even for the fake keyboard-induced mouse events. Since the fake event generator supplied blank values for everything, the button state variable got cleared, resulting in Abiathar thinking it got a new click when the mouse moved into a new tile with a button pressed.
I fixed that by making the mouse handler not set the button state variable if the mouse-move event isn't actually caused by a mouse movement. (I signal such events by setting the Delta field to 255, which can't happen naturally, if I remember correctly.)
No comments:
Post a Comment