diff options
| author | Po Lu | 2022-06-11 09:19:05 +0800 |
|---|---|---|
| committer | Po Lu | 2022-06-11 09:19:05 +0800 |
| commit | 46e6b8a1e42849ad55813c9ee387ad8bc95697fb (patch) | |
| tree | 84c7e73dffb3b7e8a20a2cc67f56a4bc5a198076 /src | |
| parent | 7def8baa086451450f8bb34b07febb232f9c148d (diff) | |
| download | emacs-46e6b8a1e42849ad55813c9ee387ad8bc95697fb.tar.gz emacs-46e6b8a1e42849ad55813c9ee387ad8bc95697fb.zip | |
Prevent crash handling keyboard input from non-frame windows
* src/xterm.c (handle_one_xevent): Use `dpyinfo' to access xkb
desc. (bug#55890)
Diffstat (limited to 'src')
| -rw-r--r-- | src/xterm.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/xterm.c b/src/xterm.c index ad925755b50..74716dfe408 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -16858,9 +16858,9 @@ handle_one_xevent (struct x_display_info *dpyinfo, | |||
| 16858 | memset (&compose_status, 0, sizeof (compose_status)); | 16858 | memset (&compose_status, 0, sizeof (compose_status)); |
| 16859 | 16859 | ||
| 16860 | #ifdef HAVE_XKB | 16860 | #ifdef HAVE_XKB |
| 16861 | if (FRAME_DISPLAY_INFO (f)->xkb_desc) | 16861 | if (dpyinfo->xkb_desc) |
| 16862 | { | 16862 | { |
| 16863 | XkbDescRec *rec = FRAME_DISPLAY_INFO (f)->xkb_desc; | 16863 | XkbDescRec *rec = dpyinfo->xkb_desc; |
| 16864 | 16864 | ||
| 16865 | if (rec->map->modmap && rec->map->modmap[xkey.keycode]) | 16865 | if (rec->map->modmap && rec->map->modmap[xkey.keycode]) |
| 16866 | goto done_keysym; | 16866 | goto done_keysym; |
| @@ -20109,9 +20109,9 @@ handle_one_xevent (struct x_display_info *dpyinfo, | |||
| 20109 | state |= x_emacs_to_x_modifiers (dpyinfo, extra_keyboard_modifiers); | 20109 | state |= x_emacs_to_x_modifiers (dpyinfo, extra_keyboard_modifiers); |
| 20110 | 20110 | ||
| 20111 | #ifdef HAVE_XKB | 20111 | #ifdef HAVE_XKB |
| 20112 | if (FRAME_DISPLAY_INFO (f)->xkb_desc) | 20112 | if (dpyinfo->xkb_desc) |
| 20113 | { | 20113 | { |
| 20114 | XkbDescRec *rec = FRAME_DISPLAY_INFO (f)->xkb_desc; | 20114 | XkbDescRec *rec = dpyinfo->xkb_desc; |
| 20115 | 20115 | ||
| 20116 | if (rec->map->modmap && rec->map->modmap[xev->detail]) | 20116 | if (rec->map->modmap && rec->map->modmap[xev->detail]) |
| 20117 | goto xi_done_keysym; | 20117 | goto xi_done_keysym; |