From 933602e7bdf7d5b5f9f020da60b68b845e4405ad Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sun, 27 Sep 2009 21:44:55 +0000 Subject: [PATCH] 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. --- src/events/SDL_active.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/events/SDL_active.c b/src/events/SDL_active.c index c99be0763..b1d7c1685 100644 --- a/src/events/SDL_active.c +++ b/src/events/SDL_active.c @@ -87,5 +87,9 @@ int SDL_PrivateAppActive(Uint8 gain, Uint8 state) if ( (state & SDL_APPINPUTFOCUS) && !gain ) { SDL_ResetKeyboard(); } + /* If we were minimized, post button-up events */ + if ( (state & SDL_APPACTIVE) && !gain ) { + SDL_ResetMouse(); + } return(posted); }