src/events/SDL_windowevents.c
changeset 5383 40c76519000e
parent 5276 8e421890cdb8
child 5398 83816c8a2b58
equal deleted inserted replaced
5382:fd9a7a0afcbf 5383:40c76519000e
    70     switch (windowevent) {
    70     switch (windowevent) {
    71     case SDL_WINDOWEVENT_SHOWN:
    71     case SDL_WINDOWEVENT_SHOWN:
    72         if (window->flags & SDL_WINDOW_SHOWN) {
    72         if (window->flags & SDL_WINDOW_SHOWN) {
    73             return 0;
    73             return 0;
    74         }
    74         }
       
    75         window->flags &= ~SDL_WINDOW_HIDDEN;
    75         window->flags |= SDL_WINDOW_SHOWN;
    76         window->flags |= SDL_WINDOW_SHOWN;
    76         SDL_OnWindowShown(window);
    77         SDL_OnWindowShown(window);
    77         break;
    78         break;
    78     case SDL_WINDOWEVENT_HIDDEN:
    79     case SDL_WINDOWEVENT_HIDDEN:
    79         if (!(window->flags & SDL_WINDOW_SHOWN)) {
    80         if (!(window->flags & SDL_WINDOW_SHOWN)) {
    80             return 0;
    81             return 0;
    81         }
    82         }
    82         window->flags &= ~SDL_WINDOW_SHOWN;
    83         window->flags &= ~SDL_WINDOW_SHOWN;
       
    84         window->flags |= SDL_WINDOW_HIDDEN;
    83         SDL_OnWindowHidden(window);
    85         SDL_OnWindowHidden(window);
    84         break;
    86         break;
    85     case SDL_WINDOWEVENT_MOVED:
    87     case SDL_WINDOWEVENT_MOVED:
    86         if (SDL_WINDOWPOS_ISUNDEFINED(data1) ||
    88         if (SDL_WINDOWPOS_ISUNDEFINED(data1) ||
    87             SDL_WINDOWPOS_ISUNDEFINED(data2)) {
    89             SDL_WINDOWPOS_ISUNDEFINED(data2)) {