sim_x11eventloop: fix X11 event accumulation
sim_x11events should process all x11 events in each event loop, otherwise it will cause events to accumulate in the queue and affect the interaction. Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
This commit is contained in:
parent
b2c8b5f674
commit
961b86642a
@ -103,9 +103,9 @@ void sim_x11events(void)
|
||||
{
|
||||
XEvent event;
|
||||
|
||||
/* Check if there are any pending, queue X11 events. */
|
||||
/* Dequeue any pending X11 events. */
|
||||
|
||||
if (g_display && XPending(g_display) > 0)
|
||||
while (g_display && XPending(g_display) > 0)
|
||||
{
|
||||
/* Yes, get the event (this should not block since we know there are
|
||||
* pending events)
|
||||
|
Loading…
x
Reference in New Issue
Block a user