<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2014-10-20 14:35 GMT+03:00 Kabeer Ahmed Khan <span dir="ltr"><<a href="mailto:kabeer.khan@samsung.com" target="_blank">kabeer.khan@samsung.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">





<div>
<p>Hey Giulio</p>
<p>Thank You for your comments.I am already doing </p>
<p>d->data_device_manager_version = MIN(version, 2);</p>
<p> </p>
<p>So comparing version while binding shouldn't be necessary.</p>
<p>Thank You<br></p></div></div></div></blockquote><div><br></div><div>Ah right, sorry. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><div><p></p>
<p> </p>
<p>------- <b>Original Message</b> -------</p>
<p><b>Sender</b> : Giulio Camuffo<<a href="mailto:giuliocamuffo@gmail.com" target="_blank">giuliocamuffo@gmail.com</a>></p>
<p><b>Date</b> : Oct 20, 2014 13:31 (GMT+05:30)</p>
<p><b>Title</b> : Re: [PATCH weston v6 2/2] window : compare version and call appropriate destructor</p>
<p> </p>2014-10-20 9:25 GMT+03:00  <u></u>:<br>> From: kabeer khan <u></u><br>><br>> Signed-off-by: kabeer khan <u></u><br>> ---<br>>  clients/window.c | 15 ++++++++++-----<br>>  1 file changed, 10 insertions(+), 5 deletions(-)<br>><br>> diff --git a/clients/window.c b/clients/window.c<br>> index 139c7f9..c8ed9a2 100644<br>> --- a/clients/window.c<br>> +++ b/clients/window.c<br>> @@ -133,6 +133,7 @@ struct display {<br>><br>>         int has_rgb565;<br>>         int seat_version;<br>> +       int data_device_manager_version;<br>>  };<br>><br>>  struct window_output {<br>> @@ -5148,9 +5149,12 @@ input_destroy(struct input *input)<br>>         if (input->selection_offer)<br>>                 data_offer_destroy(input->selection_offer);<br>><br>> -       if (input->data_device)<br>> -               wl_data_device_destroy(input->data_device);<br>> -<br>> +       if (input->data_device) {<br>> +               if(input->display->data_device_manager_version >= 2)<br>> +                       wl_data_device_release(input->data_device);<br>> +               else<br>> +                       wl_data_device_destroy(input->data_device);<br>> +       }<br>>         if (input->display->seat_version >= 3) {<br>>                 if (input->pointer)<br>>                         wl_pointer_release(input->pointer);<br>> @@ -5234,9 +5238,10 @@ registry_handle_global(void *data, struct wl_registry *registry, uint32_t id,<br>>                 d->shm = wl_registry_bind(registry, id, &wl_shm_interface, 1);<br>>                 wl_shm_add_listener(d->shm, &shm_listener, d);<br>>         } else if (strcmp(interface, "wl_data_device_manager") == 0) {<br>> +               d->data_device_manager_version = MIN(version, 2);<br>>                 d->data_device_manager =<br>> -                       wl_registry_bind(registry, id,<br>> -                                        &wl_data_device_manager_interface, 1);<br>> +                       wl_registry_bind(registry, id,<br>> +                                        &wl_data_device_manager_interface, d->data_device_manager_version);<br><br>The version used here should be MIN(d->data_device_manager_version, version)<br><br><br>>         } else if (strcmp(interface, "xdg_shell") == 0) {<br>>                 d->xdg_shell = wl_registry_bind(registry, id,<br>>                                                 &xdg_shell_interface, 1);<br>> --<br>> 2.1.0<br>><br>> _______________________________________________<br>> wayland-devel mailing list<br>> <a href="mailto:wayland-devel@lists.freedesktop.org" target="_blank">wayland-devel@lists.freedesktop.org</a><br>> <a href="http://lists.freedesktop.org/mailman/listinfo/wayland-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/wayland-devel</a><br>
<p> </p>
<p> </p>
<table>
<tbody>
<tr>
<td>
<p><img border="0" src="cid:EW9BEWXXYKEN@namo.co.kr"></p></td></tr></tbody></table></div><img src="http://ext.samsung.net/mailcheck/SeenTimeChecker?do=14f7afe1216e967457aff98d05a6c2b7a87e23749589f23fee60ab6642a0204c68faa76fc6d0059275e86b19dccefbe8abdf0e51799c0dfb021b7a989945d95349e5ff3dfdc8681d76f80bf81d31c863cf878f9a26ce15a0" border="0" width="0" height="0"></div></div><br>_______________________________________________<br>
wayland-devel mailing list<br>
<a href="mailto:wayland-devel@lists.freedesktop.org">wayland-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/wayland-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/wayland-devel</a><br>
<br></blockquote></div><br></div></div>