Smithay/wayland-rs

Backend+client API to take control of proxies

elinorbgr opened this issue · 3 comments

In some cases of FFI interaction, the user may be given a *mut wl_proxy that has not been initialized and is not managed by whatever created it. For such cases, the backend needs an API for taking control of such a *mut wl_proxy, and then some convenience methods should be added to client as well to integrate the newly initialized object into the event queue.

Could you provide some detail on how you'd imagine this to be implemented? I'm unfamiliar with wayland-rs but seems like this shouldn't be too rough.

This managed to successfully resolve my issues with my browser crashing due to leaked buffers:
catacombing/kumo@1f99d2d

I'd appreciate feedback on the implementation, I'm not sure if cloning the connection is the "correct" way to call destructors inside ObjectData::event?

If this gets merged, I'd also appreciate a 0.3.4 release with this in it, since I'd like to avoid running a patch version for an extended period of time since it can cause troubles with bisection.

#731 implemented everything I needed, so I think this can be closed?

I'll open a separate issue for the regression that broke this.