Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Leave text input enabled unless text input shows some on-screen UI el…
Browse files Browse the repository at this point in the history
…ements
  • Loading branch information
slouken committed Nov 8, 2012
1 parent 646d556 commit e3e2cb8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/events/SDL_events.c
Expand Up @@ -125,10 +125,14 @@ SDL_StartEventLoop(void)

/* 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);

/* If text input shows UI onscreen we want to start with it disabled */
if (SDL_HasScreenKeyboardSupport()) {
SDL_EventState(SDL_TEXTINPUT, SDL_DISABLE);
SDL_EventState(SDL_TEXTEDITING, SDL_DISABLE);
}

/* Create the lock and set ourselves active */
#if !SDL_THREADS_DISABLED
if (!SDL_EventQ.lock) {
Expand Down

0 comments on commit e3e2cb8

Please sign in to comment.