mirror of
https://github.com/glfw/glfw.git
synced 2024-11-26 06:14:35 +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
|
// 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
|
||||||
|
Loading…
Reference in New Issue
Block a user