src/video/gem/SDL_gemevents.c
branchSDL-1.2
changeset 6648 5415ef59343a
parent 6647 42abe340dc14
child 6649 1aab0b09a0e3
     1.1 --- a/src/video/gem/SDL_gemevents.c	Sun Nov 04 19:00:20 2012 +0100
     1.2 +++ b/src/video/gem/SDL_gemevents.c	Sun Nov 04 19:02:21 2012 +0100
     1.3 @@ -117,16 +117,6 @@
     1.4  
     1.5  		/* Mouse motion event ? */
     1.6  		if (resultat & MU_M1) {
     1.7 -			if (this->input_grab == SDL_GRAB_OFF) {
     1.8 -				/* Switch mouse focus state */
     1.9 -				if (!GEM_fullscreen && (GEM_handle>=0)) {
    1.10 -					SDL_PrivateAppActive(
    1.11 -						mouse_in_work_area(GEM_handle, mousex,mousey),
    1.12 -						SDL_APPMOUSEFOCUS);
    1.13 -				}
    1.14 -			}
    1.15 -			GEM_CheckMouseMode(this);
    1.16 -
    1.17  			do_mouse_motion(this, mousex, mousey);
    1.18  			prevmx = mousex;
    1.19  			prevmy = mousey;
    1.20 @@ -304,6 +294,16 @@
    1.21  {
    1.22  	short x2, y2, w2, h2;
    1.23  
    1.24 +	if (this->input_grab == SDL_GRAB_OFF) {
    1.25 +		/* Switch mouse focus state */
    1.26 +		if (!GEM_fullscreen && (GEM_handle>=0)) {
    1.27 +			SDL_PrivateAppActive(
    1.28 +				mouse_in_work_area(GEM_handle, mx,my),
    1.29 +				SDL_APPMOUSEFOCUS);
    1.30 +		}
    1.31 +	}
    1.32 +	GEM_CheckMouseMode(this);
    1.33 +
    1.34  	/* Don't return mouse events if out of window */
    1.35  	if ((SDL_GetAppState() & SDL_APPMOUSEFOCUS)==0) {
    1.36  		return;