From 869c4241eb9e201f668289e3d0010247c21fdba4 Mon Sep 17 00:00:00 2001 From: Ronald Kinard Date: Thu, 13 Nov 2014 19:18:24 -0600 Subject: [PATCH] Restrict mouse to window when in focus --- src/sdl/i_video.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sdl/i_video.c b/src/sdl/i_video.c index 433ce17f7..322b95732 100644 --- a/src/sdl/i_video.c +++ b/src/sdl/i_video.c @@ -752,6 +752,7 @@ static void Impl_HandleMouseMotionEvent(SDL_MouseMotionEvent evt) if (SDL_GetMouseFocus() == window && SDL_GetKeyboardFocus() == window) { D_PostEvent(&event); + SDL_SetWindowGrab(window, SDL_TRUE); HalfWarpMouse(wwidth, wheight); } }