Bug 170 : pmouseX and pmouseY the same as mouseX and mouseY in mouseReleased()
Last modified: 2006-09-12 11:57




Status:
RESOLVED
Resolution:
FIXED -
Priority:
P2
Severity:
normal

 

Reporter:
wxs
Assigned To:
fry

Attachment Type Created Size Actions

Description:   Opened: 2005-10-13 16:39
Behaviour:
In the mouseReleased() method pmouseX = mouseX and pmouseY = mouseY.

Expected:
pmouseX and pmouseY to be the previous x and y positions of the mouse respectively.

I have to work around this by making my own variables prevMouseX and prevMouseY and
setting them in the mouseDragged() method. I then refer to them in the mouseReleased()
method.
Additional Comment #1 From fry 2005-10-16 09:55
hm, so this requires keeping track of the previous mouseX and mouseY, once
removed. the 'previous' value is updated each time mousePressed() has
finished, so when you come to any new mouse event, the previous is exactly
that, the last mouse location.

it appears that in cases of events that aren't mouseDrag and mouseMove, i
need to wait to update that pmouseX/Y. messy, but probably better for most
users.
Additional Comment #2 From fry 2005-10-16 09:55
Additional Comment #3 From fry 2006-09-12 11:57
altered mouse behavior for 0116 so that mouse positions update only on
mouseMoved and mouseDragged. this also fixes a macosx bug that cause
mouseX/Y values to be bizarre because mouseExit() fired weird positions.