Mouse Cursor Capture

The correct way to reset the window properties is:

this->window->get_graphics_window()->request_properties(wp);

you shouldn’t be calling set_properties_now() directly. However, you also shouldn’t expect this to have an obvious effect on Windows; it is only necessary for other systems such as Mac and Linux, and only in conjunction with Thomas’ advice. (The purpose of setting relative mode is to allow you to call base.win.movePointer() successfully.)

But yes, doing this will constrain the mouse to the center of the window. If you want to instead allow the mouse to move freely within the window, but forbid it from leaving the window boundaries, there is little you can do to achieve that.

David