1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-23 10:48:51 -05:00

Formatting.

This commit is contained in:
Camilla Berglund 2015-07-07 10:58:55 +02:00
parent 2205bdd469
commit f825af06f0

View File

@ -924,12 +924,12 @@ static void processEvent(XEvent *event)
// presses to repeat, so detect and discard release events // presses to repeat, so detect and discard release events
if (XEventsQueued(_glfw.x11.display, QueuedAfterReading)) if (XEventsQueued(_glfw.x11.display, QueuedAfterReading))
{ {
XEvent nextEvent; XEvent next;
XPeekEvent(_glfw.x11.display, &nextEvent); XPeekEvent(_glfw.x11.display, &next);
if (nextEvent.type == KeyPress && if (next.type == KeyPress &&
nextEvent.xkey.window == event->xkey.window && next.xkey.window == event->xkey.window &&
nextEvent.xkey.keycode == event->xkey.keycode) next.xkey.keycode == event->xkey.keycode)
{ {
// HACK: Repeat events sometimes leak through due to // HACK: Repeat events sometimes leak through due to
// some sort of time drift, so add an epsilon // some sort of time drift, so add an epsilon
@ -937,7 +937,7 @@ static void processEvent(XEvent *event)
// per second so it's fairly safe to assume that // per second so it's fairly safe to assume that
// no human is pressing the key 50 times per // no human is pressing the key 50 times per
// second (value is ms) // second (value is ms)
if ((nextEvent.xkey.time - event->xkey.time) < 20) if ((next.xkey.time - event->xkey.time) < 20)
{ {
// This is very likely a server-generated key repeat // This is very likely a server-generated key repeat
// event, so ignore it // event, so ignore it