The attached patch turns on printf argument warnings for this function,
which I found was being called incorrectly at least once in the wayland
source code.
The buffer used by wl_connection_data to receive a cmsg is 128 bytes
long. This can hold at most 28 fds but when a cmsg is generated for
sending the fds, there is no check for this limitation. The man page
for recvmsg does not show any way of recovering from MSG_CTRUNC, that
happens when the buffer supplied for cmsg is too short.
Fix this by flushing the data to be written instead of generating a
cmsg buffer longer than the maximum.
This prevents distcheck from completing.
Moving the -lffi at the end of the command fixes the problem.
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
When srcdir!=builddir, there is no way to tell publican that the source
is in srcdir rather than builldir. The workaround is to copy the source
files from srcdir to builddir. To retain the en-US final destination
name, the source directory is renamed to en_US.
Tested-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
To reproduce, invoke distcheck from an out-of-source tree.
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
These were not bugs in practice, because the first (and only) field of
struct wl_surface is struct wl_resource.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Generate typed wrapper functions for sending events in a server.
This allows compile time type checking, unlike the existing method of
calling the variadic function wl_resource_post_event().
The stuff in wayland-server.h had to be slightly reordered to have all
(forward) declarations before use.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
If a client dies during a drag that it started using an icon surface,
the server could crash because the icon surface is not valid anymore.
Fix this by using a destroy listener to reset device->drag_surface to
nil when the surface is destroyed.
The listener function implementation was getting a wrong pointer to the
wl_data_offer object because the resource parameter is actually the
data source and not the data offer.
From Gaetan Nadon:
./configure: line 11662: test: !=: unary operator expected
AM_CONDITIONAL([HAVE_XSLTPROC], [test $XSLTPROC != ""])
AM_CONDITIONAL([HAVE_PUBLICAN], [test $PUBLICAN != ""])
It shows up when you do not have publican. The usual "testing for blank" bug.
In case the client isn't responding, this will block the compositor.
Instead we flush with MSG_DONTWAIT, which lets us fill up the kernel buffer
as much as we can (after not returning EPOLLOUT anymore it still can take
80k more), and then disconnect the client if we get EAGAIN.
Publican requires a read-write source tree, see
http://bugzilla.redhat.com/show_bug.cgi?id=798484
And it currently cannot build out-of-tree, so we need to copy the sources
into the _build tree and generate Protocol.xml into that tree too (we'd have
to do this anyway since automake creates a read-only source tree, so we
can't just link).
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Convert the wayland.xml protocol description to a docbook-compatible format
and hook it up to the publican sources.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
automake doesn't seem to provide a sensible method to install a directory of
stuff in $(docdir). Do it manually then.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
I'll leave them in for now as a template for how things looked originally,
this can be removed later.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
$> publican create --name=Wayland
unmodified otherwise
To build the tree to target formats, use
$> publican build --langs=en-US --formats=html,pdf
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Distribute all source files that we need for buildling.
Plus, remove the html file on make clean.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Ignore previous patch, here's the correct version.
From 4e1bedaaf05b576f5191f8fe3a34904ab9707414 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Samuel=20R=C3=B8dal?= <samuel.rodal@nokia.com>
Date: Mon, 27 Feb 2012 15:17:20 +0100
Subject: [PATCH] Allow update function to not be set in wl_display_get_fd
The same check is done in connection_update, and now with
wl_display_flush() there's less need for the client to need to know the
connection mask.
This avoids the clash with the wayland-server version with the same
name, and allows linking against both wayland-client and wayland-server
at the same time, which can be useful for unit testing purposes as
well as for nested compositing.
Without this there will be crashes as the wrong wl_display_destroy()
is called.