When a client disconnects, ocaml-wayland tries to shut down the host connection. However, shutdown isn't supported for virtio-gpu hosts. This can cause stale windows to remain on the screen for a bit, e.g.
Run a Wayland client.
Kill it with CTRL-C.
We can't shut down the host socket and try to close it instead. Since a read is currently in progress, Eio delays closing the underlying FD.
Moving the pointer over the application's window causes the compositor to send an event. This causes the read to complete, which allows the FD to be closed, causing the window to disappear at last.
Now, when a client finishes we cancel the switch, forcing the read to terminate immediately.
When a client disconnects, ocaml-wayland tries to shut down the host connection. However, shutdown isn't supported for virtio-gpu hosts. This can cause stale windows to remain on the screen for a bit, e.g.
Now, when a client finishes we cancel the switch, forcing the read to terminate immediately.