mirror of https://github.com/encounter/SDL.git
X11: send keypress events before textinput events.
This commit is contained in:
parent
0045e2e622
commit
589c46dd65
|
@ -755,19 +755,17 @@ X11_DispatchEvent(_THIS)
|
||||||
#else
|
#else
|
||||||
XLookupString(&xevent.xkey, text, sizeof(text), &keysym, NULL);
|
XLookupString(&xevent.xkey, text, sizeof(text), &keysym, NULL);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SDL_USE_IBUS
|
#ifdef SDL_USE_IBUS
|
||||||
if(SDL_GetEventState(SDL_TEXTINPUT) == SDL_ENABLE){
|
if(SDL_GetEventState(SDL_TEXTINPUT) == SDL_ENABLE){
|
||||||
if(!(handled_by_ime = SDL_IBus_ProcessKeyEvent(keysym, keycode))){
|
handled_by_ime = SDL_IBus_ProcessKeyEvent(keysym, keycode);
|
||||||
#endif
|
|
||||||
if(*text){
|
|
||||||
SDL_SendKeyboardText(text);
|
|
||||||
}
|
|
||||||
#ifdef SDL_USE_IBUS
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (!handled_by_ime) {
|
if (!handled_by_ime) {
|
||||||
SDL_SendKeyboardKey(SDL_PRESSED, videodata->key_layout[keycode]);
|
SDL_SendKeyboardKey(SDL_PRESSED, videodata->key_layout[keycode]);
|
||||||
|
if(*text) {
|
||||||
|
SDL_SendKeyboardText(text);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue