mirror of
https://github.com/glfw/glfw.git
synced 2024-11-11 13:03:52 +00:00
Formatting.
This commit is contained in:
parent
2205bdd469
commit
f825af06f0
@ -924,12 +924,12 @@ static void processEvent(XEvent *event)
|
||||
// presses to repeat, so detect and discard release events
|
||||
if (XEventsQueued(_glfw.x11.display, QueuedAfterReading))
|
||||
{
|
||||
XEvent nextEvent;
|
||||
XPeekEvent(_glfw.x11.display, &nextEvent);
|
||||
XEvent next;
|
||||
XPeekEvent(_glfw.x11.display, &next);
|
||||
|
||||
if (nextEvent.type == KeyPress &&
|
||||
nextEvent.xkey.window == event->xkey.window &&
|
||||
nextEvent.xkey.keycode == event->xkey.keycode)
|
||||
if (next.type == KeyPress &&
|
||||
next.xkey.window == event->xkey.window &&
|
||||
next.xkey.keycode == event->xkey.keycode)
|
||||
{
|
||||
// HACK: Repeat events sometimes leak through due to
|
||||
// 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
|
||||
// no human is pressing the key 50 times per
|
||||
// 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
|
||||
// event, so ignore it
|
||||
|
Loading…
Reference in New Issue
Block a user