if an X event is not sent to the user, make sure to check for more X events ready to process

This commit is contained in:
Josh Holtrop 2017-09-30 20:21:49 -04:00
parent 095d8d440e
commit 52b3c9faa9
2 changed files with 3 additions and 3 deletions

View File

@ -51,7 +51,7 @@ static bool ProcessXEvent(XEvent * x_event, Jtk_Event * event)
return false;
}
void Jtk_WaitForEvent(Jtk_Event * event)
void Jtk_WaitEvent(Jtk_Event * event)
{
for (;;)
{
@ -65,7 +65,7 @@ void Jtk_WaitForEvent(Jtk_Event * event)
}
/* Next check for an X event. */
if (XPending(g_display) > 0)
while (XPending(g_display) > 0)
{
XEvent x_event;
XNextEvent(g_display, &x_event);

View File

@ -39,6 +39,6 @@ typedef struct
};
} Jtk_Event;
void Jtk_WaitForEvent(Jtk_Event * event);
void Jtk_WaitEvent(Jtk_Event * event);
#endif