brson / rust-sdl

SDL bindings for Rust
MIT License
179 stars 52 forks source link

Added bindings for SDL_WM_GrabInput to module sdl::mouse #162

Closed jaburns closed 9 years ago

jaburns commented 9 years ago

Although SDL_WM_GrabInput may affect the way keyboard events are handled, this was done in the mouse module since it's primary use is generally to capture the cursor without having to spam SDL_WarpMouse.

lgrz commented 9 years ago

Thanks for the patch. Although my understanding is that bindings are already available from within the wm module. Was there a particular reason you were not able to use the grab_input and is_grabbing_input functions provided there?

jaburns commented 9 years ago

Heh. Somehow I managed to skip the step of grepping the project for SDL_WM_GrabInput before implementing the bindings. Sorry to bother with a redundant patch!

lgrz commented 9 years ago

No problem