inputManager.getCursorPosition() inverts the Y coordinate axis when a mouse button is pressed (in an

Our scientific app is based on SceneApplication.java from the SDK using the AWTPanels (not the Canvas) method. Inside update(), we use the mouse coordinates to determine which box on a flat field the user intends to have the current focus. In this situation, inputManager.getCursorPosition() reports the Y position using a bottom-up coordinate (Y increases from the bottom to the top of the panel). The code correctly identifies and highlights the box of interest. Works as intended until any mouse button is pressed.

When a mouse button is pressed, the Y axis inverts and Y is reported by inputManager.getCursorPosition() increasing from the top to the bottom.

inputManager.getCursorPostion() will report using a top-down coordinate system until any event is detected by an AnalogListener for mouse translation. When an event is detected, inputManager.getCursorPosition() will revert to the bottom-up Y coordinate system.

  1. As a work-around we’ve coded these conditions to derive a stable coordinate system but some unknown events are also resetting the coordinate and wrecking our day.
  2. We’ve tested the parent topComponent for extra listeners and don’t find any registered.

I cannot reproduced this, I created a test for it too and still cannot. Can you provide a test case of this happening?

Thanks for testing it! I will post code tomorrow to insert into update() inside the SDK. I suspect it is user error - just which error is it?