Created attachment 25226 [details] [review]
"After a whole lot of digging, I've managed to trace this problem to its
source. Basically it's XKB that's sending events even though the
extension is disabled, resulting in more or less a random type value
(which on this systems happens to be interpreted as XError).
On 1.5 and 1.6, the code needs to check for noXkbExtension (see patch
below). 1.7 and beyond is a bit more complex given the big rewrite
going on in Xi. I can't say I see many checks for no XkbExtension at
all in the new code."
ACK from me, this should go into the respective branches.
nominated for 1.5 and 1.6.
Closing as FIXED: I'm not sure if it went into 1.5/1.6 to be honest, but they're no longer supported and XKB has been mandatory since 1.7.