src/video/gem/SDL_gemevents.c
branchSDL-1.2
changeset 9130 347df449e563
parent 9042 89d54976ff74
child 9132 b37013ec80de
     1.1 --- a/src/video/gem/SDL_gemevents.c	Sat Sep 06 11:15:26 2014 +0200
     1.2 +++ b/src/video/gem/SDL_gemevents.c	Thu Sep 11 21:51:10 2014 +0200
     1.3 @@ -129,6 +129,8 @@
     1.4  			break;
     1.5  	}
     1.6  
     1.7 +	GEM_CheckMouseMode(this);
     1.8 +
     1.9  	/* Update mouse state */
    1.10  	graf_mkstate(&mousex, &mousey, &mouseb, &kstate);
    1.11  	do_keyboard_special(kstate, cur_tick);
    1.12 @@ -167,10 +169,10 @@
    1.13  
    1.14  static int do_messages(_THIS, short *message)
    1.15  {
    1.16 -	int quit, check_mouse_mode;
    1.17 +	int quit;
    1.18  	short x2,y2,w2,h2;
    1.19  
    1.20 -	quit = check_mouse_mode = 0;
    1.21 +	quit = 0;
    1.22  	switch (message[0]) {
    1.23  		case WM_CLOSED:
    1.24  		case AP_TERM:    
    1.25 @@ -188,7 +190,6 @@
    1.26  			if (VDI_setpalette) {
    1.27  				VDI_setpalette(this, VDI_curpalette);
    1.28  			}
    1.29 -			check_mouse_mode = 1;
    1.30  			break;
    1.31  		case WM_REDRAW:
    1.32  			if (!GEM_lock_redraw) {
    1.33 @@ -208,7 +209,6 @@
    1.34  				wind_set(GEM_handle,WF_NAME,(short)(((unsigned long)GEM_icon_name)>>16),(short)(((unsigned long)GEM_icon_name) & 0xffff),0,0);
    1.35  				GEM_refresh_name = SDL_FALSE;
    1.36  			}
    1.37 -			check_mouse_mode = 1;
    1.38  			break;
    1.39  		case WM_UNICONIFY:
    1.40  			wind_set(message[3],WF_UNICONIFY,message[4],message[5],message[6],message[7]);
    1.41 @@ -221,7 +221,6 @@
    1.42  				wind_set(GEM_handle,WF_NAME,(short)(((unsigned long)GEM_title_name)>>16),(short)(((unsigned long)GEM_title_name) & 0xffff),0,0);
    1.43  				GEM_refresh_name = SDL_FALSE;
    1.44  			}
    1.45 -			check_mouse_mode = 1;
    1.46  			break;
    1.47  		case WM_SIZED:
    1.48  			wind_set (message[3], WF_CURRXYWH, message[4], message[5], message[6], message[7]);
    1.49 @@ -258,13 +257,8 @@
    1.50  			if (VDI_setpalette) {
    1.51  				VDI_setpalette(this, VDI_oldpalette);
    1.52  			}
    1.53 -			check_mouse_mode = 1;
    1.54  			break;
    1.55  	}
    1.56 -
    1.57 -	if (check_mouse_mode) {
    1.58 -		GEM_CheckMouseMode(this);
    1.59 -	}
    1.60  	
    1.61  	return quit;
    1.62  }