summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-02-16 15:11:20 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-02-16 15:11:20 +1000
commit5a99ef7ed21ff879b6c55027590733bc7a9c6742 (patch)
tree0c5020e17b1aab7ca36a9aae277326244e736995
parent3b22e4703fa712ddb6d14d3a847ecfeac27520b4 (diff)
remove duplicate (code > 255) check.
-rw-r--r--src/evdev.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/evdev.c b/src/evdev.c
index a62ebe7..8d7b196 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -259,16 +259,18 @@ PostKbdEvent(InputInfoPtr pInfo, struct input_event *ev, int value)
if (value == 2)
return;
- if (code > 255 && ev->code <= KEY_MAX) {
- if (!warned[ev->code])
- xf86Msg(X_WARNING, "%s: unable to handle keycode %d\n",
- pInfo->name, ev->code);
- warned[ev->code] = 1;
- }
-
- /* The X server can't handle keycodes > 255 anyway, just drop them. */
if (code > 255)
+ {
+ if (ev->code <= KEY_MAX && !warned[ev->code])
+ {
+ xf86Msg(X_WARNING, "%s: unable to handle keycode %d\n",
+ pInfo->name, ev->code);
+ warned[ev->code] = 1;
+ }
+
+ /* The X server can't handle keycodes > 255. */
return;
+ }
xf86PostKeyboardEvent(pInfo->dev, code, value);
}