[PATCH] libX11: Fixing modifier key range in Xutil.h (Bug #21910)

Bodo Graumann mail at bodograumann.de
Mon Oct 10 07:40:52 PDT 2011


IsModifierKey, defined in include/X11/Xutil.h, is a macro determining,
which keys are regarded as modifiers. The constants ISO_Level5_Shift,
ISO_Level5_Latch and ISO_Level5_Lock where excluded previously, leaving
some Neo2 modifiers functionless in combination with compose.
This patch adjusts the range to include the correct, full range of
modifier constants.

Neo2 Bug 277 <http://wiki.neo-layout.org/ticket/277>

X.Org Bug 21910 <http://bugs.freedesktop.org/show_bug.cgi?id=21910>

Signed-off-by: Bodo Graumann <mail at bodograumann.de>
---
 include/X11/Xutil.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/X11/Xutil.h b/include/X11/Xutil.h
index 702823f..8cab50e 100644
--- a/include/X11/Xutil.h
+++ b/include/X11/Xutil.h
@@ -250,7 +250,7 @@ typedef struct _XComposeStatus {
 #define IsModifierKey(keysym) \
   ((((KeySym)(keysym) >= XK_Shift_L) && ((KeySym)(keysym) <= XK_Hyper_R)) \
    || (((KeySym)(keysym) >= XK_ISO_Lock) && \
-       ((KeySym)(keysym) <= XK_ISO_Last_Group_Lock)) \
+       ((KeySym)(keysym) <= XK_ISO_Level5_Lock)) \
    || ((KeySym)(keysym) == XK_Mode_switch) \
    || ((KeySym)(keysym) == XK_Num_Lock))
 #else
-- 
1.7.3.4

The bug was first introduced here:
http://cgit.freedesktop.org/xorg/proto/x11proto/commit/keysymdef.h?id=bb7584b5c88236c59c4e3040bc7c28c150abf048
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20111010/af294d97/attachment.pgp>


More information about the xorg-devel mailing list