| | |
| | | InitIME() |
| | | { |
| | | static SDL_bool inited = SDL_FALSE; |
| | | #ifdef HAVE_FCITX_FRONTEND_H |
| | | #ifdef HAVE_FCITX |
| | | const char *im_module = SDL_getenv("SDL_IM_MODULE"); |
| | | const char *xmodifiers = SDL_getenv("XMODIFIERS"); |
| | | #endif |
| | |
| | | inited = SDL_TRUE; |
| | | |
| | | /* See if fcitx IME support is being requested */ |
| | | #ifdef HAVE_FCITX_FRONTEND_H |
| | | #ifdef HAVE_FCITX |
| | | if (!SDL_IME_Init_Real && |
| | | ((im_module && SDL_strcmp(im_module, "fcitx") == 0) || |
| | | (!im_module && xmodifiers && SDL_strstr(xmodifiers, "@im=fcitx") != NULL))) { |
| | |
| | | SDL_IME_UpdateTextRect_Real = SDL_Fcitx_UpdateTextRect; |
| | | SDL_IME_PumpEvents_Real = SDL_Fcitx_PumpEvents; |
| | | } |
| | | #endif /* HAVE_FCITX_FRONTEND_H */ |
| | | #endif /* HAVE_FCITX */ |
| | | |
| | | /* default to IBus */ |
| | | #ifdef HAVE_IBUS_IBUS_H |