From 15afcdf8f6db3ca64746a17b8e87d5ea72fd41cc Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sun, 27 Jan 2013 20:37:14 -0800 Subject: [PATCH] Don't reset the mouse, that's actually bad behavior most of the time for windowed applications. --- src/events/SDL_mouse.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/events/SDL_mouse.c b/src/events/SDL_mouse.c index 00a421216..710532577 100644 --- a/src/events/SDL_mouse.c +++ b/src/events/SDL_mouse.c @@ -96,10 +96,17 @@ SDL_SetMouseFocus(SDL_Window * window) return; } + /* Actually, this ends up being a bad idea, because most operating + systems have an implicit grab when you press the mouse button down + so you can drag things out of the window and then get the mouse up + when it happens. So, #if 0... + */ +#if 0 if (mouse->focus && !window) { /* We won't get anymore mouse messages, so reset mouse state */ SDL_ResetMouse(); } +#endif /* See if the current window has lost focus */ if (mouse->focus) {