Change wording to be more consistent with other parts of the subsurface
protocol. Before this change, wl_subsurface.set_position explicitly
stated that the new state was to be applied on the parents
wl_surface.commit and wl_subsurface.place_above/below only said "on
the next commit of the parent surface". What "committed" means is
ambiguous considering that a wl_surface.commit actually defers the
actual commit when in synchronized mode, but the intention has always
been that placement of a subsurface should be considered part of its
content, i.e. placement state should be applied when other state
(buffer, regions). This patch makes that more clear.
Note that prior to this patch, one could correctly have interpreted
the protocol meaning that placements operations takes effect explicitly
on wl_surface.commit of the parent surface no matter whether other state
of the parent surface is applied at that point. This patch clarifies that
that is not the case.
https://bugs.freedesktop.org/show_bug.cgi?id=88857
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Acked-by: Jasper St. Pierre <jstpierre@mecheye.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
This paritally reverts commit a4afd90f9f.
On older expat versions (ie the one on Ubuntu 12.04) there is no pkg-config
file, so fall back to a test for the header and library. In addition the
source for expat does not seem to be in a git repository but in cvs instead
and it seems preferrable to not require cvs to build wayland.
The restored test has been updated to use AC_SEARCH_LIBS. This version
uses empty square brackets for the unused branches, similar to many other
if statements in configure.ac.
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Andrew Oakley <aoakley@espial.com>
This fixes a regression in the testsuite since c3653f7f, where four of
the timeout tests fail with "Timeouts suppressed" messages.
The timeouts are being suppressed because the testsuite is erroneously
detecting that a debugger is attached. This detection mechanism
(adopted from libinput) uses ptrace to test if there is a debugger
parent process that can be attached. Unfortunately, this is an
unreliable test: Kernel security policies exist to restrict the scope of
ptrace to prevent processes from snooping on one another.[1] This
security policy is set as the default on Ubuntu, and potentially other
Linux distributions.[2]
The Yama documentation suggests, "For software that has defined
application-specific relationships between a debugging process and its
inferior (crash handlers, etc), prctl(PR_SET_PTRACER, pid, ...) can be
used. An inferior can declare which other process (and its descendents)
are allowed to call PTRACE_ATTACH against it." This prctl call has no
effect if Yama LSM is not loaded.
The child needs to be synchronized to the client to prevent a race
condition where the child might try to operate before the parent has
finished its prctl call. This synchronization is done via pipes.
This patch can be tested by running sanity-test with
/proc/sys/kernel/yama/ptrace_scope set to 0 or 1; the test must pass for
either value.
1: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=2d514487faf188938a4ee4fb3464eeecfbdcf8eb
2: https://wiki.ubuntu.com/SecurityTeam/Roadmap/KernelHardening#ptrace_Protection
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Marek Chalupa <mchqwerty@gmail.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
v4: Allow parent to communicate error state to child to prevent leaving
child in zombie state if parent hits an error.
v5: Check errno instead of rc for error. Don't waitpid on ppid.
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
After running a test in fork, we were waiting for any child to terminate.
It is OK unless the child forks again. If the child calls fork, the waitid can
catch the child's child termination, stop block and run another test
while the former test is still running. This is racy i. e. when adding socket.
Since we have test compositor which uses fork, this situation can occur
pretty frequently.
Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Corrects an issue that would cause out-of-tree builds to fail and also
a few items that would cause distcheck to fail.
Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
(This patch has been modified to apply atop current master)
This makes it considerably easier to edit the text and make it different
for each library.
To address previous concerns with this patch, I wrote some more complete
introductory text. This is based on my understanding of these libraries, which
may not be correct, and is pretty rudimentary for libwayland-server!
However this intro text demonstrates how to create links to the
doxygen-generated text. It looks like you cannot link to methods easily as the
link name contains a hash number, but links to objects and classes work.
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
Tested-by: Jon A. Cruz <jonc@osg.samsung.com>
This is now done in the same way as the libffi dependency and still
allows the library to be installed in a non-standard location (with
PKG_CONFIG_PATH).
Otherwise a parallel make invocation could fail due to the directory
not existing.
Signed-off-by: Rui Matos <tiagomatos@gmail.com>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
To fix a shutdown crash in weston's x11 compositor I want to move the
weston X window close to an idle handler.
Since idle handlers are processed at the start of an event loop, the
handler that deals with window close will run at the start of the
next input_loop dispatch, after which the dispatcher blocks on epoll
forever (since all input events that will ever occur have been consumed).
Dispatching idle callbacks both at the start and end of event-loop
processing will prevent this permanent blocking.
Note that just moving the callback dispatch could theoretically
result in an idle callback being delayed indefinitely while waiting
for epoll_wait() to complete.
Callbacks are removed from the list when they're run, so the second
dispatch won't result in any extra calls.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Giulio Camuffo <giuliocamuffo@gmail.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Added xslt processing to give DocBook output diagram image maps/hot-linked
areas consistent with those automatically generated by Doxygen.
Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com>
Switches diagrams from using static PNG images to instead generate them via
simple graphviz DOT markup files.
Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com>
In tests that are using external libraries (i. e. pthread) we
can get failure because of leaks in the external library.
Until we have some better solution (if ever), let these (and only these)
tests to disable leak checks.
Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
When we release event queue with queued events, we can leak
proxies in some cases.
Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
When we destroy closure, we are leaking memory sometimes.
Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Sanity tests for leak checks in clients of test compositor
and also check if the test-compositor itself is not leaking
anything.
Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Run leak checks also on clients of test-compositor.
Checking leaks in memory is the same as in normal TEST.
Checking file descriptor leaks is slightly more complex, as we pass an
open file descriptor in the WAYLAND_SOCKET environment variable, which
will be consumed by a client calling wl_display_connect(), but otherwise
remain unused. We manage this accounting by checking if the environment
variable has been unset by wl_display_connect() as it consumes the
socket.
Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
[daniels: squashed counter-proposal patch to simplify fd leak checking,
plus Bill's counter-counter-proposal, and reworded log.]
1) now we can use it in the test-compositor
2) it looks better
Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Server protocols headers should include wayland-server.h,
instead of wayland-util.h. Otherwise they're not useable
with C++ compiler unless wayland-server.h was included
earlier.
Signed-off-by: Mariusz Ceier <mceier+wayland@gmail.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
This test includes one of wayland headers, which produced
error with C++ compiler. C compiler can't be used for this test,
because it issues only a warning[1] and only when wayland headers
are not installed in system headers path (/usr/include).
[1] wayland-server-protocol.h:201:2: warning: implicit declaration of function ‘wl_resource_post_event’
[daniels: Merged in Marek's follow-up to check for a C++ compiler.]
Signed-off-by: Mariusz Ceier <mceier+wayland@gmail.com>
Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
If somebody bothered to put a doxygen comment in for a macro or
typedef, make it appear in the pages. This produces documentation
for wl_container_of and wl_dispatcher_func_t from the _8h files.
Reviewed-by: "Jon A. Cruz" <jonc@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
The current xslt skips all the data that is in them, so it is ok
if they are included.
Reviewed-by: "Jon A. Cruz" <jonc@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
There are functions below the "Deprecated functions below" comment
that are not deprecated.
Move the deprecated functions back down, and add a comment at the
end of the file to try to keep this from happening again.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Put the argument lists next to the event/message title, which I
think makes it a lot easier to understand, and remove redundant
"values" title from enumerations.
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
This makes it a lot easier to figure out what is going on!
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Use simpara to remove the blank lines, and put the type/value and
the comment into the same line.
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
The fact that these functions take both a display and queue argument is
I think historical, and they really are methods on the queue.
Also added some docs for wl_display_prepare_read_queue.
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
This object is only in wayland-private.h so it's methods should not
be in the documentation.
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
We already have the id variable there and it makes it slightly easier to
read.
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Clarify that a client receiving a wl_data_device.selection event must
destroy the data_offer of the previous wl_data_device.selection event,
if any.
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
This provides targets for some of the doxygen links, and some of
them have useful memberof function lists.
Added some if/else statements to reduce validation errors.
Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>