Commit d0de6340 authored by dewyatt's avatar dewyatt

Ensure compositions are committed when keyboard focus changes.

There may be a better way to do this.
parent 5b9ec3c8
......@@ -612,6 +612,11 @@ SDL_SetKeyboardFocus(SDL_Window * window)
if (keyboard->focus && keyboard->focus != window) {
SDL_SendWindowEvent(keyboard->focus, SDL_WINDOWEVENT_FOCUS_LOST,
0, 0);
//Ensures IME compositions are committed
if (SDL_EventState(SDL_TEXTINPUT, SDL_QUERY)) {
SDL_GetVideoDevice()->StopTextInput(SDL_GetVideoDevice());
}
}
keyboard->focus = window;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment