I've learned that wl_display_dispatch implicitly flushes requests, so my comment about it was bad.
The only problem is that it waits at least one event to come.
Instead wl_display_roundtrip is similar to wl_display_dispatch, but use a sync request to receive an event and prevent blocking.
I've learned that wl_display_dispatch implicitly flushes requests, so my comment about it was bad.
The only problem is that it waits at least one event to come.
Instead wl_display_ roundtrip is similar to wl_display_ dispatch, but use a sync request to receive an event and prevent blocking.