async def process_xevents(loop, display, windows): """Coroutine which processes X11 events""" async for _ in xutil.Events(loop, display): if not any(windows.process_event()): display.discard_event()
async def main_xevents(loop, display, windows): """Coroutine which processes X11 events""" async for event in xutil.Events(loop, display): if windows: windows.process_event(event)