mirror of https://github.com/encounter/SDL.git
Fixed text input events with UIM
Alex Baines I realized overnight that my patch probably broke text input events with UIM, and I confirmed that it does. Can't believe I overlooked that... I've been making stupid mistakes in these patches recently, sorry. Anyway, *this* one seems to fix it properly. Knowing my luck it probably breaks something else.
This commit is contained in:
parent
acae3ebf74
commit
baadd54686
|
@ -585,9 +585,6 @@ X11_DispatchEvent(_THIS)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
} else if (orig_keycode == videodata->filter_code && xevent.xkey.time == videodata->filter_time) {
|
|
||||||
/* This is a duplicate event, resent by an IME - skip it. */
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Send a SDL_SYSWMEVENT if the application wants them */
|
/* Send a SDL_SYSWMEVENT if the application wants them */
|
||||||
|
@ -802,7 +799,10 @@ X11_DispatchEvent(_THIS)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (!handled_by_ime) {
|
if (!handled_by_ime) {
|
||||||
SDL_SendKeyboardKey(SDL_PRESSED, videodata->key_layout[keycode]);
|
/* Don't send the key if it looks like a duplicate of a filtered key sent by an IME */
|
||||||
|
if (xevent.xkey.keycode != videodata->filter_code || xevent.xkey.time != videodata->filter_time) {
|
||||||
|
SDL_SendKeyboardKey(SDL_PRESSED, videodata->key_layout[keycode]);
|
||||||
|
}
|
||||||
if(*text) {
|
if(*text) {
|
||||||
SDL_SendKeyboardText(text);
|
SDL_SendKeyboardText(text);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue