Clear the hidden flag when shown and the shown flag when hidden.

This commit is contained in:
Sam Lantinga 2011-02-21 22:50:15 -08:00
parent 0f6925189c
commit 252402726d

View File

@ -72,6 +72,7 @@ SDL_SendWindowEvent(SDL_Window * window, Uint8 windowevent, int data1,
if (window->flags & SDL_WINDOW_SHOWN) {
return 0;
}
window->flags &= ~SDL_WINDOW_HIDDEN;
window->flags |= SDL_WINDOW_SHOWN;
SDL_OnWindowShown(window);
break;
@ -80,6 +81,7 @@ SDL_SendWindowEvent(SDL_Window * window, Uint8 windowevent, int data1,
return 0;
}
window->flags &= ~SDL_WINDOW_SHOWN;
window->flags |= SDL_WINDOW_HIDDEN;
SDL_OnWindowHidden(window);
break;
case SDL_WINDOWEVENT_MOVED: