src/events/SDL_windowevents.c
changeset 3502 98a819296cdc
parent 2875 91a7e08cd238
child 3573 41cd18e05965
equal deleted inserted replaced
3501:467e67d301f3 3502:98a819296cdc
    84     case SDL_WINDOWEVENT_MINIMIZED:
    84     case SDL_WINDOWEVENT_MINIMIZED:
    85         if (window->flags & SDL_WINDOW_MINIMIZED) {
    85         if (window->flags & SDL_WINDOW_MINIMIZED) {
    86             return 0;
    86             return 0;
    87         }
    87         }
    88         window->flags |= SDL_WINDOW_MINIMIZED;
    88         window->flags |= SDL_WINDOW_MINIMIZED;
       
    89         SDL_OnWindowMinimized(window);
    89         break;
    90         break;
    90     case SDL_WINDOWEVENT_MAXIMIZED:
    91     case SDL_WINDOWEVENT_MAXIMIZED:
    91         if (window->flags & SDL_WINDOW_MAXIMIZED) {
    92         if (window->flags & SDL_WINDOW_MAXIMIZED) {
    92             return 0;
    93             return 0;
    93         }
    94         }
    96     case SDL_WINDOWEVENT_RESTORED:
    97     case SDL_WINDOWEVENT_RESTORED:
    97         if (!(window->flags & (SDL_WINDOW_MINIMIZED | SDL_WINDOW_MAXIMIZED))) {
    98         if (!(window->flags & (SDL_WINDOW_MINIMIZED | SDL_WINDOW_MAXIMIZED))) {
    98             return 0;
    99             return 0;
    99         }
   100         }
   100         window->flags &= ~(SDL_WINDOW_MINIMIZED | SDL_WINDOW_MAXIMIZED);
   101         window->flags &= ~(SDL_WINDOW_MINIMIZED | SDL_WINDOW_MAXIMIZED);
       
   102         SDL_OnWindowRestored(window);
   101         break;
   103         break;
   102     case SDL_WINDOWEVENT_ENTER:
   104     case SDL_WINDOWEVENT_ENTER:
   103         if (window->flags & SDL_WINDOW_MOUSE_FOCUS) {
   105         if (window->flags & SDL_WINDOW_MOUSE_FOCUS) {
   104             return 0;
   106             return 0;
   105         }
   107         }