Ensure we still clear the X locale modifiers even if not compiled with ibus or fcitx support
authorMarc Di Luzio <marcdi@unity3d.com>
Thu, 12 Jul 2018 16:52:45 +0100
changeset 120635b6f649b6488
parent 12062 d31364f5afab
child 12065 abc706dbb7af
Ensure we still clear the X locale modifiers even if not compiled with ibus or fcitx support
src/video/x11/SDL_x11keyboard.c
     1.1 --- a/src/video/x11/SDL_x11keyboard.c	Fri Jul 13 17:53:24 2018 -0400
     1.2 +++ b/src/video/x11/SDL_x11keyboard.c	Thu Jul 12 16:52:45 2018 +0100
     1.3 @@ -292,9 +292,7 @@
     1.4          char *prev_locale = setlocale(LC_ALL, NULL);
     1.5          char *prev_xmods  = X11_XSetLocaleModifiers(NULL);
     1.6          const char *new_xmods = "";
     1.7 -#if defined(HAVE_IBUS_IBUS_H) || defined(HAVE_FCITX_FRONTEND_H)
     1.8          const char *env_xmods = SDL_getenv("XMODIFIERS");
     1.9 -#endif
    1.10          SDL_bool has_dbus_ime_support = SDL_FALSE;
    1.11  
    1.12          if (prev_locale) {
    1.13 @@ -309,16 +307,12 @@
    1.14             when it is used via XIM which causes issues. Prevent this by forcing
    1.15             @im=none if XMODIFIERS contains @im=ibus. IBus can still be used via 
    1.16             the DBus implementation, which also has support for pre-editing. */
    1.17 -#ifdef HAVE_IBUS_IBUS_H
    1.18          if (env_xmods && SDL_strstr(env_xmods, "@im=ibus") != NULL) {
    1.19              has_dbus_ime_support = SDL_TRUE;
    1.20          }
    1.21 -#endif
    1.22 -#ifdef HAVE_FCITX_FRONTEND_H
    1.23          if (env_xmods && SDL_strstr(env_xmods, "@im=fcitx") != NULL) {
    1.24              has_dbus_ime_support = SDL_TRUE;
    1.25          }
    1.26 -#endif
    1.27          if (has_dbus_ime_support || !xkb_repeat) {
    1.28              new_xmods = "@im=none";
    1.29          }