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-23 16:35:46 +1000 |
commit | 486bbdc481a6eb337b57a7b85a99267cf2879aae (patch) | |
tree | bdd22b11b32d6ce2398013f9379bf56908d30f7a /src/evdev.c | |
parent | 73e5eba8cd9ef885542c94b72b783366228ce0df (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>
(cherry picked from commit a7fb654a68a26ad5f019a902312c6b94dbe9c3ea)
Diffstat (limited to 'src/evdev.c')
-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) |