diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2009-03-10 15:17:53 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-03-10 16:04:49 +1000 |
commit | a7fb654a68a26ad5f019a902312c6b94dbe9c3ea (patch) | |
tree | 090701e9df58933d270306a4da11167d945df034 /src | |
parent | 3f06825a446e317485c2e2d1880c1886684d8742 (diff) |
Restore repeat-filtering for server 1.5 and earlier.
Letting the server deal with key repeats is fine if we have server 1.6. For
earlier servers, we need to pass on the repeat events (except for modifier
keys).
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Tested-by: Marty Jack <martyj19@comcast.net>
Diffstat (limited to 'src')
-rw-r--r-- | src/evdev.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/evdev.c b/src/evdev.c index 04bce96..bc29ac9 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -263,8 +263,17 @@ PostKbdEvent(InputInfoPtr pInfo, struct input_event *ev, int value) static char warned[KEY_CNT]; /* Filter all repeated events from device. - We'll do softrepeat in the server */ - if (value == 2) + We'll do softrepeat in the server, but only since 1.6 */ + if (value == 2 +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) <= 2 + && (ev->code == KEY_LEFTCTRL || ev->code == KEY_RIGHTCTRL || + ev->code == KEY_LEFTSHIFT || ev->code == KEY_RIGHTSHIFT || + ev->code == KEY_LEFTALT || ev->code == KEY_RIGHTALT || + ev->code == KEY_LEFTMETA || ev->code == KEY_RIGHTMETA || + ev->code == KEY_CAPSLOCK || ev->code == KEY_NUMLOCK || + ev->code == KEY_SCROLLLOCK) /* XXX windows keys? */ +#endif + ) return; if (code > 255) |