Track protocol object versions inside wl_proxy.
authorJason Ekstrand <jason@jlekstrand.net>
Thu, 12 Nov 2015 19:53:15 +0000 (13:53 -0600)
committerDerek Foreman <derekf@osg.samsung.com>
Tue, 19 Jan 2016 19:58:50 +0000 (13:58 -0600)
commit557032e36cf5c45ec1a827f2ec49bdcce3833e80
tree1dfb1cd68d7362f6f958d419132415660a9448ce
parentc6437817dd9bbb2fd1027a103e77e238ad5e5ddb
Track protocol object versions inside wl_proxy.

This provides a standardized mechanism for tracking protocol object
versions in client code.  The wl_display object is created with version 1.
Every time an object is created from within wl_registry_bind, it gets the
bound version.  Every other time an object is created, it simply inherits
it's version from the parent object that created it.

(comments and minor reformatting added
by Derek Foreman <derekf@osg.samsung.com>)

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Second trivial commit squashed into this one:
Authored by Derek Foreman <derekf@osg.samsung.com>
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
(it's literally one of code and a lot of comments)

This sets wl_display's version (for proxy version query purposes)
to 0.  Any proxy created with unversioned API (this happens when
a client compiled with old headers links against new wayland)
will inherit this 0.

This gives us a way for new libraries linked by old clients to
realize they can't know a proxy's version.

wl_display's version being unqueryable (always returning 0) is
an acceptable side effect, since it's a special object you can't
bind specific versions of anyway.

Second half:
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/scanner.c
src/wayland-client-core.h
src/wayland-client.c