Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
X11: send keypress events before textinput events.
- Loading branch information
Showing
with
5 additions
and
7 deletions.
-
+5
−7
src/video/x11/SDL_x11events.c
|
@@ -755,19 +755,17 @@ X11_DispatchEvent(_THIS) |
|
|
#else |
|
|
XLookupString(&xevent.xkey, text, sizeof(text), &keysym, NULL); |
|
|
#endif |
|
|
|
|
|
#ifdef SDL_USE_IBUS |
|
|
if(SDL_GetEventState(SDL_TEXTINPUT) == SDL_ENABLE){ |
|
|
if(!(handled_by_ime = SDL_IBus_ProcessKeyEvent(keysym, keycode))){ |
|
|
#endif |
|
|
if(*text){ |
|
|
SDL_SendKeyboardText(text); |
|
|
} |
|
|
#ifdef SDL_USE_IBUS |
|
|
} |
|
|
handled_by_ime = SDL_IBus_ProcessKeyEvent(keysym, keycode); |
|
|
} |
|
|
#endif |
|
|
if (!handled_by_ime) { |
|
|
SDL_SendKeyboardKey(SDL_PRESSED, videodata->key_layout[keycode]); |
|
|
if(*text) { |
|
|
SDL_SendKeyboardText(text); |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|