I am trying to snap the mouse cursor to the center of the window every frame. I tried using the robot class to do this, but the problem with that solution is it positions the cursor relative to the screen, not the window, so it only works in fullscreen.
Is there a better way to move the cursor to the center of the window, or if not, is there a way to get the x and y position of the window on screen?
P.S. This is for a first person 3D game.