[PATCH wayland] client: add wl_proxy_get_version function

Rémi Denis-Courmont remi at remlab.net
Sun Oct 5 23:17:41 PDT 2014


    Hello,

Le 2014-10-06 03:29, Jason Ekstrand a écrit :
> Remi,
> While this would probably be nice, your approach isnt going to work. 

Yeah, I figured that much after I submitted the patch. And then I 
rediscovered that the client library does not actually know the version 
of the project objects, and wl_registry_bind() cannot be modified 
without breaking backward compatibility.

But now, I am even wondering whether this makes any sense. Assuming 
wl_proxy_get_version() gets implemented "somehow", what should the 
library do if the proxy version is *higher* than version the library 
knows of? Say a new version Y of an interface FOO adds a new request and 
a new event compared to older version X. If a FOO object is instantiated 
with version Y but the new request is never used and there is no event 
handler for the new event, will it still work as with version X? I guess 
not :-(

In my specific case, can the Wayland client treat a wl_surface version 
4 or higher as a wl_surface version 3? If not, I cannot rely on 
'wl_proxy_get_version(surface) >= 2'...

Also somewhat related to this question, what happens (or should happen) 
if a Wayland client binds a version supported by the display server, but 
not supported by the client's protocol bindings? That would happen if 
the client blindly copies the version from wl_registry.global to 
wl_registry.bind.

(...)
> 
> http://lists.freedesktop.org/archives/wayland-devel/2014-April/014004.html
> [4]

I see, thanks.

-- 
Rémi Denis-Courmont


More information about the wayland-devel mailing list