To be IsModifierKey() defined properly in X11/Xutil.h, XK_XKB_KEYS has to be
defined previously. This is done in X11/keysym.h. But this file is not resourced
and compiler gets incorrectly defined macro IsModifierKey(), unless it
explicitly includes X11/keysym.h before X11/Xutil.h.
This causes bad definition of IsModifierKey() in Emacs.
It causes for example bad function of AltGr in Emacs.
Matthias, Egbert, see
for more details.
Looking at the Redhat bugs fixes has gone into Emacs and not to Xorg.
Which implicates an error in Emacs and not xorg.
On my opinion the "fix" of Emacs (change of include order) is a only a work-around.
The bug is in in X headers (undocumented change of behavior depending on order
fixed in git