src/video/x11/SDL_x11events.c
changeset 10562 b48d8a98e261
parent 10499 363c1c7e7a41
child 10570 251691cfeaa0
     1.1 --- a/src/video/x11/SDL_x11events.c	Fri Oct 28 17:00:37 2016 -0700
     1.2 +++ b/src/video/x11/SDL_x11events.c	Fri Oct 28 01:28:58 2016 +0100
     1.3 @@ -568,14 +568,18 @@
     1.4          printf("Filtered event type = %d display = %d window = %d\n",
     1.5                 xevent.type, xevent.xany.display, xevent.xany.window);
     1.6  #endif
     1.7 +        /* Make sure dead key press/release events are sent */
     1.8 +        /* But only if we're using one of the DBus IMEs, otherwise
     1.9 +           some XIM IMEs will generate duplicate events */
    1.10          if (orig_keycode) {
    1.11 -            /* Make sure dead key press/release events are sent */
    1.12 +#if defined(HAVE_IBUS_IBUS_H) || defined(HAVE_FCITX_FRONTEND_H)
    1.13              SDL_Scancode scancode = videodata->key_layout[orig_keycode];
    1.14              if (orig_event_type == KeyPress) {
    1.15                  SDL_SendKeyboardKey(SDL_PRESSED, scancode);
    1.16              } else {
    1.17                  SDL_SendKeyboardKey(SDL_RELEASED, scancode);
    1.18              }
    1.19 +#endif
    1.20          }
    1.21          return;
    1.22      }