Commit graph

14 commits

Author SHA1 Message Date
Bryce Harrington de44761a1a Use zalloc rather than malloc and manually setting members to 0
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-11-28 16:05:39 +02:00
Peter Hutterer f3d62276d2 malloc + memset -> zalloc
And for clients using the xmalloc helper, use xzalloc.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-08-08 13:46:13 -07:00
Rob Bradford c30c4bd6c8 clipboard: remove the weston_seat destruction listener on destroy
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
2013-07-29 16:37:04 -07:00
Kristian Høgsberg 46118f8197 clipboard: Fix fd leak
We never closed the reading end of the pipe after copying data to the
clipboard.
2013-07-25 16:21:41 -07:00
Kristian Høgsberg 7ff3bdb5f7 Rename wl_data_source to weston_data_source
Missed this rename when we moved the input structs over from wayland.
2013-07-25 15:54:20 -07:00
Kristian Høgsberg 862814b2e6 clipboard: Handle OOM in clipboard_source_create() 2013-07-25 15:54:20 -07:00
Jason Ekstrand 8a4a9eb2e4 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>
2013-06-20 23:54:29 -04:00
Daniel Stone c228e23b05 configure.ac: Enable AC_USE_SYSTEM_EXTENSIONS
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]
2013-06-05 01:16:34 -04:00
Kristian Høgsberg e314875d00 input: Merge wl_seat into weston_seat 2013-05-07 09:07:43 -04:00
Kristian Høgsberg 4912454ba4 input: Remove wl_seat destroy signal
We already have one on weston_seat.
2013-05-06 22:27:40 -04:00
Rafal Mielniczuk 96ddcb25ab clipboard: add seat destroy signal handler 2012-07-11 15:42:46 -04:00
Rafal Mielniczuk 340a4343d0 clipboard: initialise clipboard memory after creation
In case we don't, weston segfault in clipboard_set_selection
on:
if (clipboard->source)
		clipboard_source_unref(clipboard->source);
2012-07-01 21:04:48 -04:00
Martin Minarik 6d11836721 Replace fprintf() by weston_log() 2012-06-08 13:11:36 -04:00
Kristian Høgsberg a7ceafff9c compositor: Add a clipboard manager
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.
2012-06-03 22:54:36 -04:00