[PATCH weston v4] Implement data_device interface destructor
Pekka Paalanen
ppaalanen at gmail.com
Tue Nov 4 04:58:16 PST 2014
On Fri, 10 Oct 2014 20:57:30 +0300
Giulio Camuffo <giuliocamuffo at gmail.com> wrote:
> A could of comments below, the rest looks good to me.
>
>
> 2014-09-23 8:21 GMT+03:00 kabeer khan <kabeer.khan at samsung.com>:
> > window : compare version and call appropriate destructor
> > data-device : change version of creation of data_device_manager and data_device interfaces
>
> Maybe it would be better to split these two changes in separate commits.
>
> >
> > Signed-off-by: kabeer khan <kabeer.khan at samsung.com>
> > ---
> > clients/window.c | 15 ++++++++++-----
> > src/data-device.c | 15 ++++++++++-----
> > 2 files changed, 20 insertions(+), 10 deletions(-)
...
> > @@ -867,9 +873,8 @@ bind_manager(struct wl_client *client,
> > {
> > struct wl_resource *resource;
> >
> > - resource =
> > - wl_resource_create(client,
> > - &wl_data_device_manager_interface, 1, id);
> > + resource = wl_resource_create(client,
> > + &wl_data_device_manager_interface, version, id);
>
> If i understand it correctly, the version used here should be
> MIN(version, 2), since the value of 'version' here is just the one the
> client passes to wl_registry.bind.
No, it's the client side code that uses MIN(server_supported,
my_supported).
This is server side code, which either uses the client supplied
version, or raises a protocol error. And I think the code in
libwayland-server already raises the protocol error in registry_bind()
if the client supplied version is not supported by the server.
Server would use MIN(my_supported, libwayland_supported) when creating
the global which is at the root of this protocol object ancestry.
Thanks,
pq
>
> > if (resource == NULL) {
> > wl_client_post_no_memory(client);
> > return;
> > @@ -909,7 +914,7 @@ WL_EXPORT int
> > wl_data_device_manager_init(struct wl_display *display)
> > {
> > if (wl_global_create(display,
> > - &wl_data_device_manager_interface, 1,
> > + &wl_data_device_manager_interface, 2,
> > NULL, bind_manager) == NULL)
> > return -1;
> >
More information about the wayland-devel
mailing list