• Jason Ekstrand's avatar
    Track protocol object versions inside wl_proxy. · 557032e3
    Jason Ekstrand authored
    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's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
    
    Second trivial commit squashed into this one:
    Authored by Derek Foreman <derekf@osg.samsung.com>
    Signed-off-by: default avatarDerek 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's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
    Reviewed-by: Jason Ekstrand's avatarJason Ekstrand <jason@jlekstrand.net>
    557032e3
wayland-client-core.h 8.29 KB