
Incorrect XDelta and YDelta values in MouseMoveEventArgs
Posted Saturday, 4 April, 2009 - 22:21 by Kamujin| Project: | The Open Toolkit library |
| Version: | 0.9.8 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
In MouseDevice.cs line 195
/// <summary> /// Sets a System.Drawing.Point representing the absolute position of the pointer, in window pixel coordinates. /// </summary> internal Point Position { set { pos = value; last_pos = pos; Move(this, new MouseMoveEventArgs(pos.X, pos.Y, pos.X - last_pos.X, pos.Y - last_pos.Y)); } }
last_pos needs to be updated after the event is fired as below.
/// <summary> /// Sets a System.Drawing.Point representing the absolute position of the pointer, in window pixel coordinates. /// </summary> internal Point Position { set { pos = value; Move(this, new MouseMoveEventArgs(pos.X, pos.Y, pos.X - last_pos.X, pos.Y - last_pos.Y)); last_pos = pos; } }


Comments
#1
Fixed in rev. 1690.
#2
Closing issues fixed in 0.9.8.