Fixed bug #582 SDL-1.2
authorSam Lantinga <slouken@libsdl.org>
Sun, 27 Sep 2009 21:44:55 +0000
branchSDL-1.2
changeset 4252052dc40d917f
parent 4251 ed5e32187eec
child 4253 b0c979816d67
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
     1.1 --- a/src/events/SDL_active.c	Sun Sep 27 19:23:04 2009 +0000
     1.2 +++ b/src/events/SDL_active.c	Sun Sep 27 21:44:55 2009 +0000
     1.3 @@ -87,5 +87,9 @@
     1.4  	if ( (state & SDL_APPINPUTFOCUS) && !gain ) {
     1.5  		SDL_ResetKeyboard();
     1.6  	}
     1.7 +	/* If we were minimized, post button-up events */
     1.8 +	if ( (state & SDL_APPACTIVE) && !gain ) {
     1.9 +		SDL_ResetMouse();
    1.10 +	}
    1.11  	return(posted);
    1.12  }