summaryrefslogtreecommitdiff
path: root/src/clipboard.c
diff options
context:
space:
mode:
authorJason Ekstrand <jason@jlekstrand.net>2013-06-14 10:07:55 -0500
committerKristian Høgsberg <krh@bitplanet.net>2013-06-20 23:54:29 -0400
commit8a4a9eb2e4c6c6c0ba98e2d3afdb796f8745eaa5 (patch)
tree6c86c1c39ae8f8bb7d5ac218a8aaf3f470477b0d /src/clipboard.c
parent1fd4b01d1013f81e79acea034bd00f47e54ba1b0 (diff)
downloadweston-8a4a9eb2e4c6c6c0ba98e2d3afdb796f8745eaa5.tar.gz
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>
Diffstat (limited to 'src/clipboard.c')
-rw-r--r--src/clipboard.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/clipboard.c b/src/clipboard.c
index eb0b2309..21a7e699 100644
--- a/src/clipboard.c
+++ b/src/clipboard.c
@@ -60,8 +60,8 @@ clipboard_source_unref(struct clipboard_source *source)
if (source->event_source)
wl_event_source_remove(source->event_source);
- wl_signal_emit(&source->base.resource.destroy_signal,
- &source->base.resource);
+ wl_signal_emit(&source->base.destroy_signal,
+ &source->base);
s = source->base.mime_types.data;
free(*s);
wl_array_release(&source->base.mime_types);
@@ -136,11 +136,11 @@ clipboard_source_create(struct clipboard *clipboard,
source = malloc(sizeof *source);
wl_array_init(&source->contents);
wl_array_init(&source->base.mime_types);
+ source->base.resource = NULL;
source->base.accept = clipboard_source_accept;
source->base.send = clipboard_source_send;
source->base.cancel = clipboard_source_cancel;
- source->base.resource.data = &source->base;
- wl_signal_init(&source->base.resource.destroy_signal);
+ wl_signal_init(&source->base.destroy_signal);
source->refcount = 1;
source->clipboard = clipboard;
source->serial = serial;