xserver: Branch 'server-1.5-branch'

Peter Hutterer whot at kemper.freedesktop.org
Sun Jul 13 05:04:18 PDT 2008


 dix/getevents.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit e135a77b8bad15fb135cd080c1725064f938b790
Author: Ander Conselvan de Oliveira <ander at mandriva.com.br>
Date:   Wed Jul 9 10:44:19 2008 -0300

    Fix incorrect test regarding keyboard map.
    
    In the map stored in each keyboard device, the first line refers to minimum
    keycode, i.e., the 0th line refers to keycode 8. When not using XKB the wrong
    test caused some keys to be interpreted as locks ('m' for instance). The had
    to be pressed twice to generate both KeyPress and KeyRelease events.
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/dix/getevents.c b/dix/getevents.c
index bf9331e..fbead11 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -408,9 +408,12 @@ GetKeyboardValuatorEvents(xEvent *events, DeviceIntPtr pDev, int type,
     int numEvents = 0;
     CARD32 ms = 0;
     KeySym *map = pDev->key->curKeySyms.map;
-    KeySym sym = map[key_code * pDev->key->curKeySyms.mapWidth];
+    KeySym sym;
     deviceKeyButtonPointer *kbp = NULL;
 
+    sym = map[(key_code - pDev->key->curKeySyms.minKeyCode)
+              * pDev->key->curKeySyms.mapWidth];
+
     if (!events)
         return 0;
 


More information about the xorg-commit mailing list