From b63baeafd24c506863da280e03efdcf0d1d8d0eb Mon Sep 17 00:00:00 2001 From: Po Lu Date: Sat, 22 Jan 2022 15:01:28 +0800 Subject: [PATCH] Get rid of some unnecessary code in handle_one_xevent * src/xterm.c (handle_one_xevent): Stop mutating event->xkey. --- src/xterm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/xterm.c b/src/xterm.c index 81baeddbcaa..36e0045d2ed 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -9276,7 +9276,8 @@ handle_one_xevent (struct x_display_info *dpyinfo, int modifiers; Lisp_Object coding_system = Qlatin_1; Lisp_Object c; - /* Event will be modified. */ + /* `xkey' will be modified, but it's not important to modify + `event' itself. */ XKeyEvent xkey = event->xkey; #ifdef USE_GTK @@ -9538,8 +9539,6 @@ handle_one_xevent (struct x_display_info *dpyinfo, if (keysym == NoSymbol) break; } - /* FIXME: check side effects and remove this. */ - ((XEvent *) event)->xkey = xkey; } done_keysym: #ifdef HAVE_X_I18N -- 2.39.5