How do I lock mouse in window?

Thank you for your reply.

Current state
-Mouse cursor does not move out of viewport
-The mouse cursor is displayed.

What i want to do
-I want to be able to move this to the title bar of the window.
But I don’t want to move the mouse cursor out of the window.

Thank you.