Smithay / client-toolkit

Smithay's toolkit for writing wayland clients
MIT License
286 stars 80 forks source link

Add Clone for dmabuf feedback structs #467

Closed chrisduerr closed 1 month ago

chrisduerr commented 2 months ago

The DmabufHandler::dmabuf_feedback handler provides access to DMA buffer feedback, however working with this feedback becomes difficult when it needs to be stored in multiple places due to missing derives.

So this patch adds the automatic Clone derive so the existing types in SCTK can be reused downstream.

The DmabufFeedback itself does not implement Clones since it relies on the Mmap type, which is not cloneable.


Note I didn't actually require this myself since I was able to clone the WebKit type I used it for. But it seems useful for other people so I thought I might as well put up a PR.

PolyMeilex commented 1 month ago

Sounds like a good idea, sorry for the delay.