diff options
author | Jason Ekstrand <jason@jlekstrand.net> | 2013-06-14 10:07:55 -0500 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2013-06-20 23:54:29 -0400 |
commit | 8a4a9eb2e4c6c6c0ba98e2d3afdb796f8745eaa5 (patch) | |
tree | 6c86c1c39ae8f8bb7d5ac218a8aaf3f470477b0d /src/clipboard.c | |
parent | 1fd4b01d1013f81e79acea034bd00f47e54ba1b0 (diff) | |
download | weston-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.c | 8 |
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; |