x11: Emulate XKB's detectable key auto-repeat
authorEmmanuele Bassi <ebassi@linux.intel.com>
Wed, 9 Dec 2009 18:46:25 +0000 (18:46 +0000)
committerEmmanuele Bassi <ebassi@linux.intel.com>
Wed, 9 Dec 2009 18:46:25 +0000 (18:46 +0000)
commit86ce92eec14aa1aaf7c9ab14a520b66690488213
treebf919d66a17da5aca25fb659caff24d9b632e6c9
parent9242d6b934710ca4001e8dc2a0f1f4bc4a738a63
x11: Emulate XKB's detectable key auto-repeat

Old-style X11 terminals require that even modern X11 send KeyPress
and KeyRelease pairs when auto-repeating. For this reason modern(-ish)
API like XKB has a way to detect auto-repeat and do a single KeyRelease
at the end of a KeyPress sequence.

The newly added check emulates XKB's detectable auto-repeat by peeking
the next event after a KeyRelease and checking if it's a KeyPress for
the same key and timestamp - and then ignoring the KeyRelease if it
matches.
clutter/x11/clutter-event-x11.c