src/video/windows/SDL_windowsevents.c
changeset 5086 c2539ff054c8
parent 5062 e8916fe9cfc8
child 5139 57851a238c8f
     1.1 --- a/src/video/windows/SDL_windowsevents.c	Mon Jan 24 15:10:16 2011 -0800
     1.2 +++ b/src/video/windows/SDL_windowsevents.c	Mon Jan 24 15:46:11 2011 -0800
     1.3 @@ -192,20 +192,20 @@
     1.4  
     1.5  	case WM_MOUSEMOVE:
     1.6  #ifdef _WIN32_WCE
     1.7 -	/* transform coords for VGA, WVGA... */
     1.8 -	{
     1.9 -	    SDL_VideoData *videodata = data->videodata;
    1.10 -	    if(videodata->CoordTransform &&
    1.11 -		(videodata->render == RENDER_GAPI || videodata->render == RENDER_RAW))
    1.12 -	    {
    1.13 -		POINT pt;
    1.14 -		pt.x = LOWORD(lParam);
    1.15 -		pt.y = HIWORD(lParam);
    1.16 -		videodata->CoordTransform(data->window, &pt);
    1.17 -    		SDL_SendMouseMotion(data->window, 0, pt.x, pt.y);
    1.18 -		break;
    1.19 -	    }
    1.20 -	}
    1.21 +        /* transform coords for VGA, WVGA... */
    1.22 +        {
    1.23 +            SDL_VideoData *videodata = data->videodata;
    1.24 +            if(videodata->CoordTransform &&
    1.25 +                (videodata->render == RENDER_GAPI || videodata->render == RENDER_RAW))
    1.26 +            {
    1.27 +                POINT pt;
    1.28 +                pt.x = LOWORD(lParam);
    1.29 +                pt.y = HIWORD(lParam);
    1.30 +                videodata->CoordTransform(data->window, &pt);
    1.31 +                    SDL_SendMouseMotion(data->window, 0, pt.x, pt.y);
    1.32 +                break;
    1.33 +            }
    1.34 +        }
    1.35  #endif
    1.36          SDL_SendMouseMotion(data->window, 0, LOWORD(lParam), HIWORD(lParam));
    1.37          break;
    1.38 @@ -252,12 +252,15 @@
    1.39              break;
    1.40          }
    1.41  
    1.42 +#ifdef WM_MOUSELEAVE
    1.43 +    /* FIXME: Do we need the SDL 1.2 hack to generate WM_MOUSELEAVE now? */
    1.44      case WM_MOUSELEAVE:
    1.45          if (SDL_GetMouseFocus() == data->window) {
    1.46              SDL_SetMouseFocus(NULL);
    1.47          }
    1.48          returnCode = 0;
    1.49          break;
    1.50 +#endif /* WM_MOUSELEAVE */
    1.51  
    1.52      case WM_SYSKEYDOWN:
    1.53      case WM_KEYDOWN:
    1.54 @@ -382,13 +385,16 @@
    1.55          returnCode = 0;
    1.56          break;
    1.57  
    1.58 +#ifdef WM_INPUTLANGCHANGE
    1.59      case WM_INPUTLANGCHANGE:
    1.60          {
    1.61              WIN_UpdateKeymap();
    1.62          }
    1.63          returnCode = 1;
    1.64          break;
    1.65 +#endif /* WM_INPUTLANGCHANGE */
    1.66  
    1.67 +#ifdef WM_GETMINMAXINFO
    1.68      case WM_GETMINMAXINFO:
    1.69          {
    1.70              MINMAXINFO *info;
    1.71 @@ -447,6 +453,7 @@
    1.72          }
    1.73          returnCode = 0;
    1.74          break;
    1.75 +#endif /* WM_GETMINMAXINFO */
    1.76  
    1.77      case WM_WINDOWPOSCHANGED:
    1.78          {
    1.79 @@ -534,6 +541,7 @@
    1.80          }
    1.81          return (1);
    1.82  
    1.83 +#if defined(SC_SCREENSAVE) || defined(SC_MONITORPOWER)
    1.84      case WM_SYSCOMMAND:
    1.85          {
    1.86              /* Don't start the screensaver or blank the monitor in fullscreen apps */
    1.87 @@ -545,6 +553,7 @@
    1.88              }
    1.89          }
    1.90          break;
    1.91 +#endif /* System has screensaver support */
    1.92  
    1.93      case WM_CLOSE:
    1.94          {
    1.95 @@ -656,7 +665,9 @@
    1.96      }
    1.97      if (!name && !SDL_Appname) {
    1.98          name = "SDL_app";
    1.99 +#if defined(CS_BYTEALIGNCLIENT) || defined(CS_OWNDC)
   1.100          SDL_Appstyle = (CS_BYTEALIGNCLIENT | CS_OWNDC);
   1.101 +#endif
   1.102          SDL_Instance = hInst ? hInst : GetModuleHandle(NULL);
   1.103      }
   1.104