diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2008-10-16 22:35:42 +1030 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@redhat.com> | 2008-10-23 17:14:45 +1030 |
commit | cab104fd9e508030db623bae2eb70bd5dd1bf450 (patch) | |
tree | 4213e4828c5a89c05880b96e7545fa7814c0b20e /src | |
parent | 708eb345997336f2df58b1d8c5ef36572e8f420c (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)
Diffstat (limited to 'src')
-rw-r--r-- | src/evdev.c | 4 |
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); } |