How you can see my mouse goes little bit faster than widget.
My movement algorithm is:
cursorPositionPrev.set(cursorPosition);
cursorPosition.set(getCurrentPos());
...
Vector2f delta = new Vector2f(cursorPosition).sub(cursorPositionPrev);
widget.getPosition().add(delta);
I am using LWJGL and my own GUI solution.
Here is visual structure of event processor part. One thread for processing events generated by user and another thread render current gui state.
Even if rendering and processing events is in one thread the issue is still exist.
So what can I do to make to avoid this delay and make widget to keep up with the mouse movement?