[RFC wayland] Track protocol object versions inside wl_proxy.

Jason Ekstrand jason at jlekstrand.net
Wed Nov 25 21:46:58 PST 2015


On Nov 25, 2015 12:03 PM, "Derek Foreman" <derekf at osg.samsung.com> wrote:
>
> On 13/11/15 12:21 PM, Jason Ekstrand wrote:
> > On Fri, Nov 13, 2015 at 3:18 AM, Giulio Camuffo <giuliocamuffo at gmail.com>
wrote:
> >> So do i understand correctly that if the app creating the
> >> wl_compositor was built against a libwayland without this patch the
> >> version returned in mesa by wl_proxy_get_version() for every proxy
> >> will be always 1?
> >
> > Yes, see also the second e-mail link below.  I proposed to make
> > wl_display version 0 so that libraries can detect whether the client
> > was built against old or new libwayland.
> >
> > --Jason
>
> We can do a test like...
> if (proxy == (struct wl_proxy *)proxy->display)
>         return 1;
>
> in wl_proxy_get_version() if we want to return non-0 values from
> wl_display_get_version(display);
>
> Is this worth the trouble, or is it safe to always consider wl_display
> to be "unversioned"?

I don't think it matters.  The wl_display object will only ever report one
version.  Whether that version is 1 or 0 probably doesn't matter.  I'd
personally go with 0 but I think you already knew that. ;-)
--Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20151125/14890699/attachment.html>


More information about the wayland-devel mailing list