I actually have troubles with this in source engine games.
I have 2 screens so even fullscreen(only one screen) I can still loose focus if I move the mouse really quickly to the right and left click.
It infuriates me that the source engine still has not worked that out.
This should be pretty easy to implement. I have played with this before on windows.
Here is all you need. It locks the cursor to an area. You will need to resize it with the window.
http://msdn.microsoft.com/en-us/library/windows/desktop/ms648383(v=vs.85).aspxXGrabPointer might work on linux. Never used it though.
With mac I have no idea.
I could make a patch for this with the go ahead on the api implementation from Laurent.(not mac. I do not own one)
Of course for the time for him to decide on the api he could implement it himself.
I suppose something like this
void Window::lockMouseCursor(bool locked)
bool Window::isLockMouseCursor()
though sfml uses set and get everywhere. So i suppose
void Window::setMouseCursorLocked(bool locked)
bool Window::getMouseCursorLocked()