Synchronize the Wayland event loop with WPEBackend-fdo (but without a wl_event_queue).
Now the events which are already pending in "check" are dispatched in "dispatch" instead of
synchronously.
This allows glib to handle priorities, which should be fairer.
This fixes at least :
error handling :
"check" failed repeatedly with "Wayland::Display: error in wayland read", but "dispatch"
was not called so the source was not removed.
deadlock when g_main_context_check doesn't check our source :
It happens either when the set of file descriptor changes, or when an higher priority
source is ready.
"prepare" was called twice without "check", then wl_display_read_events blocked forever.
Synchronize the Wayland event loop with WPEBackend-fdo (but without a wl_event_queue).
Now the events which are already pending in "check" are dispatched in "dispatch" instead of synchronously. This allows glib to handle priorities, which should be fairer.
This fixes at least :
error handling : "check" failed repeatedly with "Wayland::Display: error in wayland read", but "dispatch" was not called so the source was not removed.
deadlock when g_main_context_check doesn't check our source : It happens either when the set of file descriptor changes, or when an higher priority source is ready. "prepare" was called twice without "check", then wl_display_read_events blocked forever.