Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add Mouse Capture/Grab #394
When programming an application in window mode, which is using the mouse movement but is not using the mouse position (like a first person shooter), one need to make sure the cursor won't leave the window.
One common way to realize this is to set the mouse cursor to the center of the window after each frame.
But there's a problem if the mouse-movement is too fast and/or the framerate of the application too low. In that case the cursor can leave the window for a small period of time. If the user clicks the mouse right in this moment, the window will loose the focus.
I suggest to wrap around the methods to capture/grap the mouse provided by the operating system. Maybe some kind of
For discussion about this feature request, see the forum.
In the forum, there are also operating-system functions suggested to realize this: