Decrease amount of Hocus Pocus

This commit is contained in:
Camilla Berglund 2016-03-02 23:14:55 +01:00
parent de2d4c7763
commit 663ee327b0

View File

@ -976,12 +976,13 @@ static void processEvent(XEvent *event)
next.xkey.window == event->xkey.window &&
next.xkey.keycode == keycode)
{
// HACK: Repeat events sometimes leak through due to
// some sort of time drift, so add an epsilon
// Toshiyuki Takahashi can press a button 16 times
// per second so it's fairly safe to assume that
// no human is pressing the key 50 times per
// second (value is ms)
// HACK: The time of repeat events sometimes doesn't
// match that of the press event, so add an
// epsilon
// Toshiyuki Takahashi can press a button
// 16 times per second so it's fairly safe to
// assume that no human is pressing the key 50
// times per second (value is ms)
if ((next.xkey.time - event->xkey.time) < 20)
{
// This is very likely a server-generated key repeat