src/video/x11/SDL_x11events.c
changeset 10562 b48d8a98e261
parent 10499 363c1c7e7a41
child 10570 251691cfeaa0
equal deleted inserted replaced
10561:35fee69e84df 10562:b48d8a98e261
   566     if (X11_XFilterEvent(&xevent, None) == True) {
   566     if (X11_XFilterEvent(&xevent, None) == True) {
   567 #if 0
   567 #if 0
   568         printf("Filtered event type = %d display = %d window = %d\n",
   568         printf("Filtered event type = %d display = %d window = %d\n",
   569                xevent.type, xevent.xany.display, xevent.xany.window);
   569                xevent.type, xevent.xany.display, xevent.xany.window);
   570 #endif
   570 #endif
       
   571         /* Make sure dead key press/release events are sent */
       
   572         /* But only if we're using one of the DBus IMEs, otherwise
       
   573            some XIM IMEs will generate duplicate events */
   571         if (orig_keycode) {
   574         if (orig_keycode) {
   572             /* Make sure dead key press/release events are sent */
   575 #if defined(HAVE_IBUS_IBUS_H) || defined(HAVE_FCITX_FRONTEND_H)
   573             SDL_Scancode scancode = videodata->key_layout[orig_keycode];
   576             SDL_Scancode scancode = videodata->key_layout[orig_keycode];
   574             if (orig_event_type == KeyPress) {
   577             if (orig_event_type == KeyPress) {
   575                 SDL_SendKeyboardKey(SDL_PRESSED, scancode);
   578                 SDL_SendKeyboardKey(SDL_PRESSED, scancode);
   576             } else {
   579             } else {
   577                 SDL_SendKeyboardKey(SDL_RELEASED, scancode);
   580                 SDL_SendKeyboardKey(SDL_RELEASED, scancode);
   578             }
   581             }
       
   582 #endif
   579         }
   583         }
   580         return;
   584         return;
   581     }
   585     }
   582 
   586 
   583     /* Send a SDL_SYSWMEVENT if the application wants them */
   587     /* Send a SDL_SYSWMEVENT if the application wants them */