Commit Graph

1692 Commits

Author SHA1 Message Date
Rui Matos
cd0cf5a106 doc/publican/Makefile.am: Add a missing order-only prerequisite
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>
2015-01-28 18:44:46 -08:00
Derek Foreman
5ec8062df2 event-loop: Dispatch idle callbacks twice
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>
2015-01-28 18:12:31 -08:00
Jon Cruz
7575e2ea19 doc: update diagrams for compatibility.
Change attribute separators for compatiblity with graphviz older than 2.30.

Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-01-28 17:43:19 -08:00
Jon Cruz
8cf9a367c9 doc: Create hot-linked areas in documents.
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>
2015-01-28 17:43:18 -08:00
Jon Cruz
b5fca036cc doc: Switch from static image files to generated diagrams.
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>
2015-01-28 17:43:16 -08:00
Marek Chalupa
f858550cf4 display-test: disable leak check in tests that use pthread
pthread is leaking and it makes our tests fail.

Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2015-01-28 17:17:24 +00:00
Marek Chalupa
68c11c48c0 tests: add possibility to disable leak check for single test
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>
2015-01-28 17:17:22 +00:00
Marek Chalupa
5c70c03190 client: unref or destroy proxy when releasing queue
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>
2015-01-28 17:17:19 +00:00
Marek Chalupa
73cb90763c client: release display queue in wl_display_disconnect()
Don't leak events, not even on exit

Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2015-01-28 17:17:16 +00:00
Marek Chalupa
2e20270280 connection-test: add tests for closure leaks
When we destroy closure, we are leaking memory sometimes.

Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2015-01-28 17:17:13 +00:00
Marek Chalupa
d1855797d3 tests: add tests for leak check in clients
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>
2015-01-28 17:17:09 +00:00
Marek Chalupa
9ef0277571 test-compositor: extend leak checks into clients
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.]
2015-01-28 17:17:06 +00:00
Marek Chalupa
d8e72f98f2 test-runner: move leak checking into function
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>
2015-01-28 17:15:57 +00:00
Mariusz Ceier
6197f32cad scanner: Fix header generation for server protocols
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>
2015-01-27 11:18:36 +00:00
Mariusz Ceier
e3dc9a7af6 tests: C++ compilation test
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>
2015-01-27 11:17:42 +00:00
Bryce Harrington
9386e2be27 tests: Correct return code handling
Reviewed-by: Marek Chalupa <mchqwerty@gmail.com>
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
2015-01-26 18:11:40 -08:00
Bryce Harrington
2eeb2cbc52 tests: Fix typo "evnironment"
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Marek Chalupa <mchqwerty@gmail.com>
2015-01-26 18:11:11 -08:00
Bill Spitzak
284da98a3c doc: Put a dash between type/enum value and description
This was suggested by Derek Foreman, I think it looks better

Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-01-26 17:55:00 -08:00
Bill Spitzak
ed57d6d438 doc: Add macros and typedefs to the documentation
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>
2015-01-26 17:54:59 -08:00
Bill Spitzak
5409187ed0 doc: there is no need to move the _8h files
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>
2015-01-26 17:54:54 -08:00
Bryce Harrington
71c37eb91a cosmetic: Cleanup trailing whitespace 2015-01-26 11:30:57 -08:00
Derek Foreman
a1a6aa54aa cosmetic: Move the deprecated functions back to the end of the file
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>
2015-01-26 11:29:03 -08:00
Bill Spitzak
6750538455 doc: remove redundant subtitles
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>
2015-01-23 18:45:03 -08:00
Bill Spitzak
d90fd15ee4 doc: Add object types and links to arguments int protocol documentation
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>
2015-01-23 18:45:02 -08:00
Bill Spitzak
be8064d2d4 doc: compress the lists in the protocol docs some
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>
2015-01-23 18:45:01 -08:00
Bill Spitzak
1f39fbf8d2 doc: made functions taking wl_event_queue arg belong to wl_event_queue
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>
2015-01-23 18:44:57 -08:00
Bill Spitzak
d3770c0661 doc: Remove wl_map from documentation
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>
2015-01-23 18:44:56 -08:00
Bill Spitzak
074e120cb3 doc: Remove deprecated functions from documentation
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-01-23 18:44:55 -08:00
Bill Spitzak
594ec7e689 doc: add missing \memberof to wl_display_get_protocol_error
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-01-23 18:44:54 -08:00
Jonas Ådahl
ab3ee6f6d9 server: Use existing id variable when inserting created object
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>
2015-01-23 18:20:41 -08:00
Jonas Ådahl
5ce947bd90 protocol: Clarify selection data offer destruction requirement
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>
2015-01-23 18:20:35 -08:00
Jonas Ådahl
434d797d27 protocol: Fix typo in wl_data_offer
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2015-01-23 18:20:29 -08:00
Bryce Harrington
b7f9925abc configure.ac: bump version to 1.6.91 for the alpha release 2015-01-17 03:39:05 -08:00
Bill Spitzak
2888e97d5d doc: make itemized lists from doxygen work
Not actually used currently but probably a good idea.

Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-12-19 16:33:34 +02:00
Bill Spitzak
0d0a62c79a doc: Document structures and unions in addition to classes
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>
2014-12-19 16:27:51 +02:00
Bill Spitzak
f980a60038 doc: Each class in doxygen output is a section
All the methods belonging to the class are listed with it, making
it much easier to find them.

I dumped all other functions into a section called "Functions" at
the end.

Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-12-19 16:21:36 +02:00
Bill Spitzak
4abe5edf46 doc: removed the word "interface" from the link names
Just to make it slightly shorter.

Also add a dash to the doxygen links to make them look a bit more alike.

Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-12-19 16:15:29 +02:00
Bill Spitzak
dfc64f9ffe doc: Reduce the validation errors of the docbook input
(this is different from previous version as it removes some
broken and irrelevant changes to the protocol appendix).

This removes all the validation errors except for missing link
targets. You can test this by removing the --skip-validation
from doc/publican/Makefile.am.

Main changes are to avoid nesting <para> commands. I also used
<simpara> in some places to reduce the amount of blank space.
And the reference id's are prefixed with the chapter name to
avoid collisions between libclient and libserver.

PS: it would be useful if somebody who actually knows something
about xslt would come up with a way to translate a block of text
makde of <para> commands unchanged, but add <para> around plain
text. Most of the difficulty is that doxygen's output is rather
inconsistent here.

Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-12-19 16:10:36 +02:00
Bill Spitzak
75ec915da8 fixup doc: Make it easier to add a new doxygen page
This supersedes the previous one and fixes a typo where a slash was missing.

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-12-18 15:23:03 +02:00
Bill Spitzak
6e3ad249ad doc: Make it easier to add a new doxygen page
The repetitive parts of generating the server and client documentation are
merged, so it is easier to add another doxygen chapter: add a new line to
$publican_sources in publican/Makefile.am, and a list of C source files to
doxygen/Makefile.am.

Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2014-12-18 15:13:39 +02:00
Bill Spitzak
3f05c4ac4a doc: fix for parallel make
Move the *_8h.xml files to a per-chapter temporary file so two
chapters can be converted from doxygen at the same time. Tested
with make -j 9.

Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2014-12-18 15:07:22 +02:00
Bill Spitzak
c985a17988 doc: Split libwayland-client and -server into different pages
This was suggested before to make it clearer that things like wl_display
are different objects in each of them. I made these into two appendixes
because the protocol spec was already an appendix.

Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
[Bryce requested minor changes, not yet here.]

Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-12-16 17:07:25 +02:00
Bill Spitzak
0b788154da doc: fix doxygen->man command line
It was telling it to scan the doxyfile as well as the C source, and
listing some source files more than once.

Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-12-16 17:05:23 +02:00
Jon A. Cruz
163ce87cd7 doc: Minor makefile cleanup.
Split out directory creation to leverage order only prerequisites.

Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-12-16 16:52:12 +02:00
Jon A. Cruz
dec30252b0 doc: General makefile cleanup.
This is a general cleanup of the makefile in order to bring it more inline
with standard make practices. Cleanups included more use of automatic
variables, switching AM_V_GEN to AM_V_at to have one 'GEN' visible per file,
splitting copy operations to proper rules, and using order only dependencies
to properly create directories on-demand.

Changes also correct missing use of $(builddir) that has gone unnoticed as
it defaults to the current directory ('.').

Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-12-16 16:48:32 +02:00
Marek Chalupa
434fd45e4b client: update documentation about threading
Remove out-dated documentation and add few more words
about this topic.

v2. replace a paragraph by better explanation from Pekka Paalanen
    fix other notes from reviewing

v3. fix typo

v4. fix flags for poll in an example

    add wl_display_cancel_read() to another example
    (so that user sees that it should be used)

    move proper use of wl_display_prepare_read
    before the explanation why it is wrong to use
    wl_display_displach

Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2014-12-09 18:05:04 +02:00
Marek Chalupa
77939736fb client: update obsolete comments
1) there is nothing like main thread since
   3c7e8bfbb4 anymore, so remove
   it from documentation and update the doc accordingly.

2) use calling 'default queue' instead of 'main queue'. In the code
   we use display->default_queue, so it'll be easier the understand.

3) update some obsolete or unprecise pieces of documentation

v2. Not only remove out-of-date comment, but fix/remove more
    things across the wayland-client.[ch]

v3. fixes (rephrasing unclear paragraphs etc.)
    according to Pakka Paalanen notes (thanks)

Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2014-12-09 18:03:35 +02:00
Jon A. Cruz
480b437cd8 doc: Add config check for doxygen 1.6.0+.
Add a config time check for a new enough (1.6.0+) version of doxygen.

v2. require 1.6.0+ instead of 1.8.0+

Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-12-08 10:07:35 +02:00
Bill Spitzak
9ca542db4e doc: Remove duplicated descriptions of wayland objects
This text is a duplicate of the text in the protocol documentation, but
the converter mangled it by removing the paragraph breaks and some other
errors. Instead replace it with a list of links to the protocol docs.

Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-12-05 16:58:28 +02:00
Bill Spitzak
0093164f85 doc: removed redundant dependency
The .tmp file dependency depends on the index.xml file so it does not need to
be repeated.

Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-12-05 16:56:39 +02:00