-
Notifications
You must be signed in to change notification settings - Fork 144
Description
poll_dispatch_pending
is documented as "similar to" dispatch_pending
. But the behavior doesn't seem quite as expected.
If I use wayland-client
in a GTK application, spawning a thread calling dispatch_pending
in a loop successfully dispatches events for the code using wayland_client
(though it's a busy loop). blocking_dispatch()
also seems to work, apparently without interfering with GTK's own use of Wayland.
But spawning an async task on glib's executor with poll_fn(event_queue.poll_dispatch_pending())
doesn't allow the wayland-rs code to receive events from Wayland. I guess something needs to call wl_display_dispatch_queue
/wl_display_dispatch_queue_pending
for the event queue for the dispatcher function to be called, which then wakes the async task? Not sure if there's a better way to implement this.