data-device: Change resources in wl_data_offer and wl_data_source to pointers.
Because of its links to selection.c and xwayland, a destroy_signal field
was also added to wl_data_source. Before selection.c and xwayland were
manually initializing the resource.destroy_signal field so that it could be
used without a valid resource.
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
diff --git a/src/xwayland/selection.c b/src/xwayland/selection.c
index 66cb5fe..6c7cfc0 100644
--- a/src/xwayland/selection.c
+++ b/src/xwayland/selection.c
@@ -177,11 +177,10 @@
if (source == NULL)
return;
- wl_signal_init(&source->base.resource.destroy_signal);
+ wl_signal_init(&source->base.destroy_signal);
source->base.accept = data_source_accept;
source->base.send = data_source_send;
source->base.cancel = data_source_cancel;
- source->base.resource.data = source;
source->wm = wm;
wl_array_init(&source->base.mime_types);