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 - Capture Input
Summary: Capture Input
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.0
Hardware: All All
: P2 enhancement
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-14 09:45 UTC by skaller
Modified: 2015-02-18 06:02 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.