From: kabeer <[email protected]>

window: use data_device interface destructor
data-device: implement data_device_release destructor

Signed-off-by: kabeer <[email protected]>
---
 clients/window.c  |    2 +-
 src/data-device.c |    6 ++++++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/clients/window.c b/clients/window.c
index 5d64022..001cfb8 100644
--- a/clients/window.c
+++ b/clients/window.c
@@ -5049,7 +5049,7 @@ input_destroy(struct input *input)
                data_offer_destroy(input->selection_offer);
 
        if (input->data_device)
-               wl_data_device_destroy(input->data_device);
+               wl_data_device_release(input->data_device);
 
        if (input->display->seat_version >= 3) {
                if (input->pointer)
diff --git a/src/data-device.c b/src/data-device.c
index 75fc60c..9dca58b 100644
--- a/src/data-device.c
+++ b/src/data-device.c
@@ -761,10 +761,16 @@ data_device_set_selection(struct wl_client *client,
                                  wl_resource_get_user_data(source_resource),
                                  serial);
 }
+static void
+data_device_release(struct wl_client *client, struct wl_resource *resource)
+{
+       wl_resource_destroy(resource);
+}
 
 static const struct wl_data_device_interface data_device_interface = {
        data_device_start_drag,
        data_device_set_selection,
+       data_device_release
 };
 
 static void
-- 
1.7.9.5

_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to