mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-23 10:48:51 -05:00
Formatting.
This commit is contained in:
parent
2205bdd469
commit
f825af06f0
|
@ -886,9 +886,9 @@ static void processEvent(XEvent *event)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const int count = XwcLookupString(window->x11.ic,
|
const int count = XwcLookupString(window->x11.ic,
|
||||||
&event->xkey,
|
&event->xkey,
|
||||||
buffer, sizeof(buffer),
|
buffer, sizeof(buffer),
|
||||||
NULL, &status);
|
NULL, &status);
|
||||||
|
|
||||||
for (i = 0; i < count; i++)
|
for (i = 0; i < count; i++)
|
||||||
_glfwInputChar(window, buffer[i], mods, plain);
|
_glfwInputChar(window, buffer[i], mods, plain);
|
||||||
|
@ -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