ocaml-wayland
ocaml-wayland copied to clipboard
Support disconnecting a client with a protocol error
I’m planning on using wayland-proxy-virtwl in Qubes OS. To protect the host compositor, Qubes OS requires that the proxy validate incoming requests and reject ones that violate the protocol or appear to be malicious. However, I can’t see any way to disconnect the client with a protocol error.
You should be able to do it in two steps: send the error (Wl_display.error) and then disconnect (Server.stop).
Though it might be that stop shuts the connection down before the queued error is sent. Possibly calling stop should add a stop message to outbox and have it shut down the connection when it gets to that?
Though it might be that
stopshuts the connection down before the queued error is sent. Possibly callingstopshould add a stop message tooutboxand have it shut down the connection when it gets to that?
Maybe? There is also a use-case for shutting things down immediately.
Can you look at #46? That implements enough features so that errors posted by the host compositor are received by the guest client. Most of the work is on protocol error handling.