diff --git a/src/events/SDL_events.c b/src/events/SDL_events.c index ade28a697..75aed9221 100644 --- a/src/events/SDL_events.c +++ b/src/events/SDL_events.c @@ -123,12 +123,6 @@ SDL_StartEventLoop(void) FIXME: Does this introduce any other bugs with events at startup? */ - /* No filter to start with, process most event types */ - SDL_EventOK = NULL; - SDL_EventState(SDL_TEXTINPUT, SDL_DISABLE); - SDL_EventState(SDL_TEXTEDITING, SDL_DISABLE); - SDL_EventState(SDL_SYSWMEVENT, SDL_DISABLE); - /* Create the lock and set ourselves active */ #if !SDL_THREADS_DISABLED if (!SDL_EventQ.lock) { @@ -138,6 +132,13 @@ SDL_StartEventLoop(void) return (-1); } #endif /* !SDL_THREADS_DISABLED */ + + /* No filter to start with, process most event types */ + SDL_EventOK = NULL; + SDL_EventState(SDL_TEXTINPUT, SDL_DISABLE); + SDL_EventState(SDL_TEXTEDITING, SDL_DISABLE); + SDL_EventState(SDL_SYSWMEVENT, SDL_DISABLE); + SDL_EventQ.active = 1; return (0);