diff options
author | Ander Conselvan de Oliveira <ander@mandriva.com.br> | 2008-07-09 10:50:21 -0300 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2008-07-10 17:27:13 +0930 |
commit | c42427f63f0e0495e56909ee99ad1e3c4321c39b (patch) | |
tree | 7942c90d8d9a2ce720a0d67ce625ca4f198195c8 /dix/getevents.c | |
parent | e4054e5cb3d919dfc83021be3f2b9036d0e5a2be (diff) |
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@who-t.net>
Diffstat (limited to 'dix/getevents.c')
-rw-r--r-- | dix/getevents.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/dix/getevents.c b/dix/getevents.c index 3713f4b08..e11131148 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) |