summaryrefslogtreecommitdiff
path: root/src/clipboard.c
Commit message (Collapse)AuthorAgeFilesLines
* clipboard: zalloc the clipboard_sourceCarlos Garnacho2016-02-011-1/+1
| | | | | | | | | The wrapped weston_data_source struct has new fields which were left uninitialized, so its access is unreliable. Signed-off-by: Carlos Garnacho <carlosg@gnome.org> Reviewed-by: Derek Foreman <derekf@osg.samsung.com Tested-by: Derek Foreman <derekf@osg.samsung.com>
* Unified multiple definitions of container_of() macro.Jon Cruz2015-06-151-0/+1
| | | | | | | | | Removed duplicate definitions of the container_of() macro and refactored sources to use the single implementation. Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
* src: Update boilerplate from MIT X11 license to MIT Expat licenseBryce Harrington2015-06-151-16/+19
|
* clipboard: don't crash if the source client does not send a mime typeGiulio Camuffo2015-05-011-1/+1
| | | | Reviewed-by: Daniel Stone <daniels@collabora.com>
* clipboard: set fd member of clipboard_sourceMarek Chalupa2014-12-121-0/+1
| | | | | | | | | | The fd member of clipboard_source structure was not set but was used in close(). v2. don't do unnecessary changes Signed-off-by: Marek Chalupa <mchqwerty@gmail.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* Use zalloc rather than malloc and manually setting members to 0Bryce Harrington2014-11-281-2/+3
| | | | | Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* malloc + memset -> zallocPeter Hutterer2013-08-081-2/+1
| | | | | | And for clients using the xmalloc helper, use xzalloc. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* clipboard: remove the weston_seat destruction listener on destroyRob Bradford2013-07-291-0/+1
| | | | | | | | Prior to freeing the memory in which the link node for the signal is emedded we should remove the link node from the list to prevent the list from being corrupted. https://bugs.freedesktop.org/show_bug.cgi?id=67231
* clipboard: Fix fd leakKristian Høgsberg2013-07-251-2/+8
| | | | | We never closed the reading end of the pipe after copying data to the clipboard.
* Rename wl_data_source to weston_data_sourceKristian Høgsberg2013-07-251-5/+5
| | | | Missed this rename when we moved the input structs over from wayland.
* clipboard: Handle OOM in clipboard_source_create()Kristian Høgsberg2013-07-251-1/+18
|
* data-device: Change resources in wl_data_offer and wl_data_source to pointers.Jason Ekstrand2013-06-201-4/+4
| | | | | | | | | 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>
* configure.ac: Enable AC_USE_SYSTEM_EXTENSIONSDaniel Stone2013-06-051-1/+1
| | | | | | | | | | | | | | | | | | AC_USE_SYSTEM_EXTENSIONS enables _XOPEN_SOURCE, _GNU_SOURCE and similar macros to expose the largest extent of functionality supported by the underlying system. This is required since these macros are often limiting rather than merely additive, e.g. _XOPEN_SOURCE will actually on some systems hide declarations which are not part of the X/Open spec. Since this goes into config.h rather than the command line, ensure all source is consistently including config.h before anything else, including system libraries. This doesn't need to be guarded by a HAVE_CONFIG_H ifdef, which was only ever a hangover from the X.Org modular transition. Signed-off-by: Daniel Stone <daniel@fooishbar.org> [pq: rebased and converted more files]
* input: Merge wl_seat into weston_seatKristian Høgsberg2013-05-071-6/+6
|
* input: Remove wl_seat destroy signalKristian Høgsberg2013-05-061-1/+1
| | | | We already have one on weston_seat.
* clipboard: add seat destroy signal handlerRafal Mielniczuk2012-07-111-0/+14
|
* clipboard: initialise clipboard memory after creationRafal Mielniczuk2012-07-011-0/+1
| | | | | | | In case we don't, weston segfault in clipboard_set_selection on: if (clipboard->source) clipboard_source_unref(clipboard->source);
* Replace fprintf() by weston_log()Martin Minarik2012-06-081-1/+0
|
* compositor: Add a clipboard managerKristian Høgsberg2012-06-031-0/+263
We use the selection signal to get a callback when somebody sets a selection (including the X server proxy) and then copy the contents of the first mime type. If the selection is cleared (when the client dies), we set a new selection with that contents.