xserver: Branch 'master'

Peter Hutterer whot at kemper.freedesktop.org
Thu Jul 10 00:59:33 PDT 2008


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

New commits:
commit c42427f63f0e0495e56909ee99ad1e3c4321c39b
Author: Ander Conselvan de Oliveira <ander at mandriva.com.br>
Date:   Wed Jul 9 10:50:21 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 3713f4b..e111311 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -696,7 +696,8 @@ GetKeyboardValuatorEvents(EventList *events, DeviceIntPtr pDev, int type,
         return 0;
 
     map = pDev->key->curKeySyms.map;
-    sym = map[key_code * pDev->key->curKeySyms.mapWidth];
+    sym = map[(key_code - pDev->key->curKeySyms.minKeyCode)
+              * pDev->key->curKeySyms.mapWidth];
 
     master = pDev->u.master;
     if (master && master->u.lastSlave != pDev)


More information about the xorg-commit mailing list