src/events/SDL_keyboard.c
changeset 4882 e725a6a60c32
parent 4763 518d1679d2d0
child 4890 443771460df9
equal deleted inserted replaced
4881:0972c2893e68 4882:e725a6a60c32
   610 
   610 
   611     /* See if the current window has lost focus */
   611     /* See if the current window has lost focus */
   612     if (keyboard->focus && keyboard->focus != window) {
   612     if (keyboard->focus && keyboard->focus != window) {
   613         SDL_SendWindowEvent(keyboard->focus, SDL_WINDOWEVENT_FOCUS_LOST,
   613         SDL_SendWindowEvent(keyboard->focus, SDL_WINDOWEVENT_FOCUS_LOST,
   614                             0, 0);
   614                             0, 0);
       
   615 
       
   616         //Ensures IME compositions are committed
       
   617         if (SDL_EventState(SDL_TEXTINPUT, SDL_QUERY)) {
       
   618             SDL_GetVideoDevice()->StopTextInput(SDL_GetVideoDevice());
       
   619         }
   615     }
   620     }
   616 
   621 
   617     keyboard->focus = window;
   622     keyboard->focus = window;
   618 
   623 
   619     if (keyboard->focus) {
   624     if (keyboard->focus) {