Bug 818 : mouseX, mouseY both 0 in mouseReleased if not moved before
Last modified: 2008-06-11 05:58




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

 

Reporter:
fjen
Assigned To:
fry

Attachment Type Created Size Actions

Description:   Opened: 2008-06-11 01:22
not sure this is actually a real bug or just something that needs to be noted in the reference ...

mouseX and mouseY don't seem to be set if the mouse did not move over the window before. i
guess it's not so easy to set them at startup since you didn't receive any mouseEvents ... so i
see why they are set to 0,0.

not a new bug, happens in both 0135 and 0140. os-x, 10.5.3, java 1.5.x

example: you have to move the window so that it starts right under the mouse. click in the
window.

void setup ()
{
size( 200, 200 );
}

void draw ()
{

}

void mouseReleased ()
{
println( new int[]{ mouseX, mouseY } );
}

F
Additional Comment #1 From fry 2008-06-11 05:58
right, we need events before we can do anything.