src/events/SDL_windowevents.c
changeset 5261 595814f561f7
parent 5249 7a963be087ef
child 5262 b530ef003506
equal deleted inserted replaced
5260:62d2bc792002 5261:595814f561f7
    84     case SDL_WINDOWEVENT_MOVED:
    84     case SDL_WINDOWEVENT_MOVED:
    85         if (SDL_WINDOWPOS_ISUNDEFINED(data1) ||
    85         if (SDL_WINDOWPOS_ISUNDEFINED(data1) ||
    86             SDL_WINDOWPOS_ISUNDEFINED(data2)) {
    86             SDL_WINDOWPOS_ISUNDEFINED(data2)) {
    87             return 0;
    87             return 0;
    88         }
    88         }
    89         if (window->flags & SDL_WINDOW_FULLSCREEN) {
       
    90             window->fullscreen.x = data1;
       
    91             window->fullscreen.y = data1;
       
    92         } else {
       
    93             window->windowed.x = data1;
       
    94             window->windowed.y = data1;
       
    95         }
       
    96         if (data1 == window->x && data2 == window->y) {
    89         if (data1 == window->x && data2 == window->y) {
    97             return 0;
    90             return 0;
    98         }
    91         }
    99         window->x = data1;
    92         window->x = data1;
   100         window->y = data2;
    93         window->y = data2;
   101 
       
   102         if (window->flags & SDL_WINDOW_FULLSCREEN) {
       
   103             /* Do we really want to do this? */
       
   104             return 0;
       
   105         }
       
   106         break;
    94         break;
   107     case SDL_WINDOWEVENT_RESIZED:
    95     case SDL_WINDOWEVENT_RESIZED:
   108         if (window->flags & SDL_WINDOW_FULLSCREEN) {
       
   109             window->fullscreen.w = data1;
       
   110             window->fullscreen.h = data1;
       
   111         } else {
       
   112             window->windowed.w = data1;
       
   113             window->windowed.h = data1;
       
   114         }
       
   115         if (data1 == window->w && data2 == window->h) {
    96         if (data1 == window->w && data2 == window->h) {
   116             return 0;
    97             return 0;
   117         }
    98         }
   118         window->w = data1;
    99         window->w = data1;
   119         window->h = data2;
   100         window->h = data2;
   120         SDL_OnWindowResized(window);
   101         SDL_OnWindowResized(window);
   121 
       
   122         if (window->flags & SDL_WINDOW_FULLSCREEN) {
       
   123             /* Do we really want to do this? */
       
   124             return 0;
       
   125         }
       
   126         break;
   102         break;
   127     case SDL_WINDOWEVENT_MINIMIZED:
   103     case SDL_WINDOWEVENT_MINIMIZED:
   128         if (window->flags & SDL_WINDOW_MINIMIZED) {
   104         if (window->flags & SDL_WINDOW_MINIMIZED) {
   129             return 0;
   105             return 0;
   130         }
   106         }