src/events/SDL_keyboard.c
changeset 4882 e725a6a60c32
parent 4763 518d1679d2d0
child 4890 443771460df9
     1.1 --- a/src/events/SDL_keyboard.c	Tue Sep 07 20:56:02 2010 -0700
     1.2 +++ b/src/events/SDL_keyboard.c	Wed Sep 15 00:28:19 2010 -0400
     1.3 @@ -612,6 +612,11 @@
     1.4      if (keyboard->focus && keyboard->focus != window) {
     1.5          SDL_SendWindowEvent(keyboard->focus, SDL_WINDOWEVENT_FOCUS_LOST,
     1.6                              0, 0);
     1.7 +
     1.8 +        //Ensures IME compositions are committed
     1.9 +        if (SDL_EventState(SDL_TEXTINPUT, SDL_QUERY)) {
    1.10 +            SDL_GetVideoDevice()->StopTextInput(SDL_GetVideoDevice());
    1.11 +        }
    1.12      }
    1.13  
    1.14      keyboard->focus = window;