Closed alyssais closed 1 year ago
This is not correct, because the callback is triggered before the configure event has been sent. Wayland clients depend on being able to wl_display_roundtrip() to wait for the xdg_surface to have been configured after sending wl_surface.commit.
To wait for a surface to be configured, you should wait for the configured
event I think. Sending a callback and hoping configuration finishes first sounds like it might work, but I don't recall seeing any guarantee about that.
Except for Xwayland, the proxy just relays sync requests to the host, so it shouldn't be affecting anything: https://github.com/talex5/wayland-proxy-virtwl/blob/f49f69a314e2cdec4cb6833d690be5f24009c2b1/relay.ml#L1308-L1316
If you run the proxy with -v
, it will show both the host and client protocols, which might make it easier to see what's going on (i.e. whether the host replied to the callback before doing the configure).
You're right. It's still a bit of a mystery to me how this happened if wayland-proxy-virtwl just relays everything back and worth, and sway (according to one of its maintainers) should send configure
immediately, but this is a client bug, and it looks like it will be fixed in the client. Thanks!
Most of the time, I get traces like this:
This is correct, because the callback is triggered after the configure event has been sent.
But very occasionally, I get traces like this instead:
This is not correct, because the callback is triggered before the configure event has been sent. Wayland clients depend on being able to
wl_display_roundtrip()
to wait for the xdg_surface to have been configured after sendingwl_surface.commit
.I can only assume that this is a wayland-proxy-virtwl bug, because I've never seen it happen directly with my host compositor, and I've verified in #wayland that the client code looks correct.