summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2008-10-16 22:35:42 +1030
committerJulien Cristau <jcristau@debian.org>2008-10-16 15:47:31 +0200
commit7243116f55609a2a5f73bb88cf6ad6386c9bbc0b (patch)
treeb77d483ff32656e42d7ff6525d9cd749f3e641e3
parent0089d931ac5fb290c82908da652b28c8b515d449 (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>
-rw-r--r--src/evdev.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/evdev.c b/src/evdev.c
index aafbbe5..865b451 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -164,6 +164,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);
}