diff options
| author | Po Lu | 2022-07-27 13:01:41 +0800 |
|---|---|---|
| committer | Po Lu | 2022-07-27 13:01:54 +0800 |
| commit | de863f70aa905d3a7feaedb58b65bd7f9776853b (patch) | |
| tree | fe519f21992fcc721803093372bf75c72dbe905c | |
| parent | 86f60ec54a8033dc783646655ffd31447c8bf8c3 (diff) | |
| download | emacs-de863f70aa905d3a7feaedb58b65bd7f9776853b.tar.gz emacs-de863f70aa905d3a7feaedb58b65bd7f9776853b.zip | |
Remove workaround for some input method problems
* src/xterm.c (handle_one_xevent): Remove modifier key
workaround for some input method problems, since they cause more
problems than they fix. (bug#56782)
| -rw-r--r-- | src/xterm.c | 44 |
1 files changed, 1 insertions, 43 deletions
diff --git a/src/xterm.c b/src/xterm.c index 6f8291b494b..48e9a174fa5 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -17756,7 +17756,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, | |||
| 17756 | /* `xkey' will be modified, but it's not important to modify | 17756 | /* `xkey' will be modified, but it's not important to modify |
| 17757 | `event' itself. */ | 17757 | `event' itself. */ |
| 17758 | XKeyEvent xkey = event->xkey; | 17758 | XKeyEvent xkey = event->xkey; |
| 17759 | int i; | 17759 | |
| 17760 | #ifdef HAVE_XINPUT2 | 17760 | #ifdef HAVE_XINPUT2 |
| 17761 | Time pending_keystroke_time; | 17761 | Time pending_keystroke_time; |
| 17762 | struct xi_device_t *source; | 17762 | struct xi_device_t *source; |
| @@ -17806,27 +17806,6 @@ handle_one_xevent (struct x_display_info *dpyinfo, | |||
| 17806 | if (modifiers & dpyinfo->meta_mod_mask) | 17806 | if (modifiers & dpyinfo->meta_mod_mask) |
| 17807 | memset (&compose_status, 0, sizeof (compose_status)); | 17807 | memset (&compose_status, 0, sizeof (compose_status)); |
| 17808 | 17808 | ||
| 17809 | #ifdef HAVE_XKB | ||
| 17810 | if (dpyinfo->xkb_desc) | ||
| 17811 | { | ||
| 17812 | XkbDescRec *rec = dpyinfo->xkb_desc; | ||
| 17813 | |||
| 17814 | if (rec->map->modmap && rec->map->modmap[xkey.keycode]) | ||
| 17815 | goto done_keysym; | ||
| 17816 | } | ||
| 17817 | else | ||
| 17818 | #endif | ||
| 17819 | { | ||
| 17820 | if (dpyinfo->modmap) | ||
| 17821 | { | ||
| 17822 | for (i = 0; i < 8 * dpyinfo->modmap->max_keypermod; i++) | ||
| 17823 | { | ||
| 17824 | if (xkey.keycode == dpyinfo->modmap->modifiermap[i]) | ||
| 17825 | goto done_keysym; | ||
| 17826 | } | ||
| 17827 | } | ||
| 17828 | } | ||
| 17829 | |||
| 17830 | #ifdef HAVE_X_I18N | 17809 | #ifdef HAVE_X_I18N |
| 17831 | if (FRAME_XIC (f)) | 17810 | if (FRAME_XIC (f)) |
| 17832 | { | 17811 | { |
| @@ -21163,27 +21142,6 @@ handle_one_xevent (struct x_display_info *dpyinfo, | |||
| 21163 | #ifdef HAVE_XKB | 21142 | #ifdef HAVE_XKB |
| 21164 | if (dpyinfo->xkb_desc) | 21143 | if (dpyinfo->xkb_desc) |
| 21165 | { | 21144 | { |
| 21166 | XkbDescRec *rec = dpyinfo->xkb_desc; | ||
| 21167 | |||
| 21168 | if (rec->map->modmap && rec->map->modmap[xev->detail]) | ||
| 21169 | goto xi_done_keysym; | ||
| 21170 | } | ||
| 21171 | else | ||
| 21172 | #endif | ||
| 21173 | { | ||
| 21174 | if (dpyinfo->modmap) | ||
| 21175 | { | ||
| 21176 | for (i = 0; i < 8 * dpyinfo->modmap->max_keypermod; i++) | ||
| 21177 | { | ||
| 21178 | if (xev->detail == dpyinfo->modmap->modifiermap[i]) | ||
| 21179 | goto xi_done_keysym; | ||
| 21180 | } | ||
| 21181 | } | ||
| 21182 | } | ||
| 21183 | |||
| 21184 | #ifdef HAVE_XKB | ||
| 21185 | if (dpyinfo->xkb_desc) | ||
| 21186 | { | ||
| 21187 | uint xkb_state = state; | 21145 | uint xkb_state = state; |
| 21188 | xkb_state &= ~(1 << 13 | 1 << 14); | 21146 | xkb_state &= ~(1 << 13 | 1 << 14); |
| 21189 | xkb_state |= xev->group.effective << 13; | 21147 | xkb_state |= xev->group.effective << 13; |