Mercurial > sdl-ios-xcode
diff src/events/SDL_active.c @ 4252:052dc40d917f SDL-1.2
Fixed bug #582
Tomi Belan 2008-05-03 00:52:32 PDT
If you release a mouse button while an application is minimized, the
application won't notice it and will still report the button is pressed.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 27 Sep 2009 21:44:55 +0000 |
parents | a1b03ba2fcd0 |
children |
line wrap: on
line diff
--- a/src/events/SDL_active.c Sun Sep 27 19:23:04 2009 +0000 +++ b/src/events/SDL_active.c Sun Sep 27 21:44:55 2009 +0000 @@ -87,5 +87,9 @@ if ( (state & SDL_APPINPUTFOCUS) && !gain ) { SDL_ResetKeyboard(); } + /* If we were minimized, post button-up events */ + if ( (state & SDL_APPACTIVE) && !gain ) { + SDL_ResetMouse(); + } return(posted); }