Subject: 29.0.50; Emacs ignores xmodmap Super_L assignment

From: Stephen Berman <[email-masked]>
Date: Mon, 07 Mar 2022 12:36:12 +0100

I have these entries in ~/.Xmodmap:

keysym Super_L = slash
keysym Menu = backslash

In my latest build from master (details below), the Super_L assignment
is ignored and Emacs does not react at all to pressing the Super_L key
(the Menu assignment is still recognized).  According to git bisect the
following commit introduced this behavior change:

15910e5da34a084fe01e0fd96ecf394cb1030e25 is the first bad commit
commit 15910e5da34a084fe01e0fd96ecf394cb1030e25
Author: Po Lu <[email-masked]>
Date:   Sun Feb 20 10:03:28 2022 +0800

    Ignore modifier keys early when handling X key press events

    * src/xterm.c (handle_one_xevent): Ignore modifier keys earlier
    without going through the usual key lookup.
    (x_delete_terminal): Free recorded modifier map.
    (x_find_modifier_meanings): Record modifier map.

    * src/xterm.h (struct x_display_info): New field `modmap'.

In GNU Emacs 29.0.50 (build 3, x86_64-pc-linux-gnu, GTK+ Version 3.24.31, cairo version 1.17.4)
 of 2022-03-06 built on strobelfs2
Repository revision: 98d2dc6522114e4044077801f11a3ed8de9c1147
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101003
System Description: Linux From Scratch r11.0-165

Configured using:
 'configure --with-xinput2 --with-xwidgets 'CFLAGS=-Og -g3'
 PKG_CONFIG_PATH=/opt/qt5/lib/pkgconfig'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBSYSTEMD LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG RSVG
SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS WEBP X11 XDBE XIM
XINPUT2 XPM XWIDGETS GTK3 ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix