# HG changeset patch # User Sam Lantinga # Date 1254087895 0 # Node ID 052dc40d917f52e775576a6a5a8ce0c43a675045 # Parent ed5e32187eecf3d37e751f660b63f0ce9429693b 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. diff -r ed5e32187eec -r 052dc40d917f src/events/SDL_active.c --- 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); }