summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2008-10-16 22:35:42 +1030
committerPeter Hutterer <peter.hutterer@redhat.com>2008-10-17 11:19:06 +1030
commit46f2b83e0130da2260559ad63f75dbf9c00bb83c (patch)
tree8b51fb5e3b687247e27835e23f12531532509bab
parentd73a1732c6a2c093f76bdc5f32b3a53fdef92b15 (diff)
Don't post keycodes > 255.
If we only have keys > 255 we don't set up a key class rec, so don't post them. It makes the server unhappy. Signed-off-by: Julien Cristau <jcristau@debian.org> (cherry picked from commit 7243116f55609a2a5f73bb88cf6ad6386c9bbc0b)
-rw-r--r--src/evdev.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/evdev.c b/src/evdev.c
index 019d70d..3d7a76f 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -155,6 +155,10 @@ PostKbdEvent(InputInfoPtr pInfo, struct input_event *ev, int value)
warned[ev->code] = 1;
}
+ /* The X server can't handle keycodes > 255 anyway, just drop them. */
+ if (code > 255)
+ return;
+
xf86PostKeyboardEvent(pInfo->dev, code, value);
}