We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 2035

Summary: Capture Input
Product: SDL Reporter: skaller <skaller>
Component: videoAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: enhancement    
Priority: P2 CC: icculus
Version: HG 2.0   
Hardware: All   
OS: All   

Description skaller 2013-08-14 09:45:29 UTC
Feature Request.

SDL currently provides a function for a window to capture mouse and keyboard input, namely SDL_SetWindowGrab. This function also causes a mouse leaving the window to be warped back into the window.

This behaviour is unconventional and leaves the system without a way to do a conventional capture, in which the mouse is allowed to move freely but mouse and keyboard events continue to be delivered to the capturing window until the capture is released.

By symmetry I would call this function SDL_SetWindowCapture.
Comment 1 Ryan C. Gordon 2015-02-18 06:02:06 UTC
Something like this is going into 2.0.4, SDL_CaptureMouse().

    https://hg.libsdl.org/SDL/file/0d1e81f10b7e/include/SDL_mouse.h#l163

--ryan.