Enable/disable mouse focus
authorPatrice Mandin <patmandin@gmail.com>
Thu, 02 Jun 2005 22:00:48 +0000
changeset 10655d9947da7510
parent 1064 fba6b67b4d60
child 1066 671bbd773c8a
Enable/disable mouse focus
src/video/gem/SDL_gemevents.c
     1.1 --- a/src/video/gem/SDL_gemevents.c	Tue May 31 12:31:11 2005 +0000
     1.2 +++ b/src/video/gem/SDL_gemevents.c	Thu Jun 02 22:00:48 2005 +0000
     1.3 @@ -224,6 +224,9 @@
     1.4  		case WM_TOPPED:
     1.5  			wind_set(message[3],WF_TOP,message[4],0,0,0);
     1.6  			SDL_PrivateAppActive(1, SDL_APPINPUTFOCUS);
     1.7 +			if (this->input_grab == SDL_GRAB_OFF) {
     1.8 +				SDL_PrivateAppActive(1, SDL_APPMOUSEFOCUS);
     1.9 +			}
    1.10  			break;
    1.11  		case WM_REDRAW:
    1.12  			if (!GEM_lock_redraw) {
    1.13 @@ -286,6 +289,9 @@
    1.14  		case WM_BOTTOMED:
    1.15  		case WM_UNTOPPED:
    1.16  			SDL_PrivateAppActive(0, SDL_APPINPUTFOCUS);
    1.17 +			if (this->input_grab == SDL_GRAB_OFF) {
    1.18 +				SDL_PrivateAppActive(0, SDL_APPMOUSEFOCUS);
    1.19 +			}
    1.20  			break;
    1.21  	}
    1.22