events_queued/[2,3]
events_queued(+Mode, -Number) events_queued(+Displayable, +Mode, -Number)
Unify Number with an integer giving the number of events queued for the given Displayable, which if omitted, is the default Display.
If there are currently any events in Xlib's queue, the predicate returns immediately, unifying Number, regardless of the value of Mode. Otherwise, it behaves according to the value of Mode:
already
after_reading
after_flushing
after_reading
, but also flushes the
output buffer.