From 252402726d7200f6d8c474d77168e1cfb1b8b0e6 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Mon, 21 Feb 2011 22:50:15 -0800 Subject: [PATCH] Clear the hidden flag when shown and the shown flag when hidden. --- src/events/SDL_windowevents.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/events/SDL_windowevents.c b/src/events/SDL_windowevents.c index 463635da..a090934e 100644 --- a/src/events/SDL_windowevents.c +++ b/src/events/SDL_windowevents.c @@ -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: