On Thu Mar 23 15:26:28 2023 +0000, Alexandros Frantzis wrote:
The problem is that if we stick to using an old version of the
protocols, we will not be able to use new protocols that fills the gaps Wine may need to functions properly without resorting to using any weird workaround that work half of the time. If there is an updated protocol version (or a new protocol), we would need to take explicit action, both to use it in the code and also to ensure we can access the updated protocol sources. If we use wayland-protocols we would need to depend on a newer package version that ships the files we need. If we vendor the protocol .xml file we would need to manually copy the new file to the driver sources. In both cases the process is straightforward, so I am not really concerned either way. Note that Wayland protocols have strong backward compatibility guarantees, so bringing in an updated (minor) version of a protocol .xml still allows us to use all older features.
If using a vendor protocol .xml with the latest protocols and it can
generate backward compatible code with the unmodified outdated wayland-scanner version this would be the best solution, but even in this situation compatibility can be an issue. At the moment at least, all (non-ancient) versions of wayland-scanner can generate .c/.h code for all current protocols. In the unlikely case that this changes and there is a protocol that requires a particular wayland-scanner version, and we absolutely need to have it, we will just have to introduce a minimum libwayland/wayland-scanner dependency. For now, the only dependency we have to deal with is that the .c/.h protocol code generated by a wayland-scanner version is only guaranteed to work with the matching libwayland or newer. Vendoring (or not) is completely orthogonal to all of the above, it's just a matter of where one gets the protocol .xml files from.
@julliard I have updated the MR to use vendored Wayland protocol .xml files (while still generating .c/.h at build time). Let me know what you think. Thanks!