Moritz Kiefer [Sun, 6 Nov 2016 17:35:19 +0000 (18:35 +0100)]
doc: Fix a typo in the client documentation
Signed-off-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Dennis Kempin [Fri, 11 Nov 2016 19:40:55 +0000 (11:40 -0800)]
protocol: Extend wl_touch with touchpoint shape and orientation
This CL updates the wl_touch interface with a shape and
orientation event.
The shape/orientation of a touch point is not relevant for most UI
applications, but allows a better experience in some cases
such as drawing apps.
The events are used by the compositor to inform the client
about changes in the shape and orientation of a touchpoint, which is
approximated by an ellipse and it's angle to the y-axis.
The event is optional and only sent when compositor and the
touch device support this type of information. The client is
responsible for making a reasonable assumption about the
touch shape if no shape is reported.
Signed-off-by: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Yong Bakos [Fri, 11 Nov 2016 15:55:38 +0000 (07:55 -0800)]
util: Document wl_fixed_t
Add doxygen comments for wl_fixed_t and its methods.
Although wl_fixed_t can be thought of as an opaque struct, it is a typedef. As
such, doxygen does not provide an elegant means of documenting it as both a
'class' with members and as a typedef. In other words, documenting it as a class
gives us a nice doxygen page for wl_fixed_t and its related methods, but this
leaves the typedef documentation blank in the documentation for wayland-util,
and does not provide a link to the documentation for wl_fixed_t. Hence, this
patch does not treat wl_fixed_t as a class/struct, resulting in the typedef
being documented and keeping the functions listed in wayland-util, rather than a
separate unlinked page devoted to just wl_fixed_t.
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Yong Bakos [Tue, 8 Nov 2016 16:02:12 +0000 (08:02 -0800)]
util: Remove stray space from function signature
wl_fixed_to_double had a stray space before the parameter list.
Remove this space.
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Bill Spitzak [Tue, 17 May 2016 06:18:06 +0000 (23:18 -0700)]
scanner: Fixed doxygen group name for _add_listener
Signed-off-by: Bill Spitzak <spitzak@gmail.com>
Acked-by: Yong Bakos <ybakos@humanoriented.com>
Pekka Paalanen [Wed, 9 Nov 2016 15:16:51 +0000 (17:16 +0200)]
Makefile: do not put TESTS into check_PROGRAMS
If you assign TESTS into check_PROGRAMS, you cannot add a test that is
not built from source files.
Instead, use a temporary variable built_test_programs to hold the names
that are both programs built from source files and tests to execute.
This change is required by the following patch adding wayland-scanner
test script.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Yong Bakos [Thu, 3 Nov 2016 20:42:54 +0000 (13:42 -0700)]
tests: Test wl_message_count_arrays
message-test.c did not cover wl_message_count_arrays, so add one test that
specifically tests this method. Note that this exposes wl_message_count_arrays
in a private header (wayland-private.h), and removes the `static` modifier of
the implementation.
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Yong Bakos [Mon, 31 Oct 2016 13:46:18 +0000 (06:46 -0700)]
protocol: Remove inconsistent line breaks
Enum entries and message arguments are sometimes preceded by a blank line, but
often aren't.
Standardize the format of the protocol specification by removing blank lines
preceding a list of message arguments and enum entries.
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Yong Bakos [Thu, 27 Oct 2016 15:55:01 +0000 (08:55 -0700)]
util: Document wl_message
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Yong Bakos [Wed, 7 Sep 2016 13:25:27 +0000 (06:25 -0700)]
scanner: Remove return doxygen annotation
Replace \returns with just Returns, as this is not a doxygen comment block.
(Avoids differing with the existing convention of \return for return values.)
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Daniel Stone [Thu, 10 Nov 2016 11:14:03 +0000 (11:14 +0000)]
tests: Use unique XDG_RUNTIME_DIR
Rather than using a hardcoded 'wayland-tests' directory under
the existing XDG_RUNTIME_DIR to use as the new runtime dir, use mkdtemp
to guarantee uniqueness. This fixes make -jN check, as well as just
happening to run 'make check' twice from the same session.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Reported-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Yong Bakos [Sun, 2 Oct 2016 16:09:59 +0000 (09:09 -0700)]
protocol: Use singleton global consistently
The protocol describes wl_shm as a "global singleton" rather than
"singleton global," which is the order used throughout other protocol
object descriptions.
Re-order the terms for consistency.
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Yong Bakos [Fri, 30 Sep 2016 06:59:58 +0000 (23:59 -0700)]
protocol: Describe wl_registry as singleton
Other singleton objects in the protocol are described as such.
Add a singleton adjective to the wl_registry description, making it
similar to other descriptions.
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Yong Bakos [Fri, 12 Aug 2016 19:04:41 +0000 (12:04 -0700)]
shm: Make shm_pool_interface static const
Add static const modifiers to the shm_pool_interface definition,
making it consistent with the other wl_*_interface definitions and
mundanely safer.
Note that this does not affect the ABI, according to abi-dumper and
abi-compliance-checker[1]; and weston and its shm-backed clients still
run as expected.
[1]: http://lvc.github.io/abi-compliance-checker/
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Tested-by: Yong Bakos <ybakos@humanoriented.com>
Acked-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Yong Bakos [Sat, 17 Sep 2016 22:04:32 +0000 (15:04 -0700)]
util: Document GCC attributes
Add doxygen comment blocks so these annotations are documented in the html
documentation.
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Yong Bakos [Tue, 27 Sep 2016 18:03:50 +0000 (13:03 -0500)]
array-test: Include wayland-util.h and simplify init test
Include wayland-util.h in addition to wayland-private.h, to be more explicit
about where wl_array is defined.
Remove the useless repeated testing of wl_array_init, because if it fails once
out of thousands of iterations we're all doomed anyway.
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
[Pekka: add the memset]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Yong Bakos [Tue, 27 Sep 2016 18:03:49 +0000 (13:03 -0500)]
tests: Test wl_array_release
array-test.c did not cover wl_array_release, so add one test that specifically
tests this method.
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
[Pekka: do not overwrite array.data]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Yong Bakos [Tue, 27 Sep 2016 18:03:48 +0000 (13:03 -0500)]
wl_array: Set data to invalid address after free
Explicitly set the data member to an invalid memory address during
wl_array_release, such that re-using a freed wl_array without re-initializing
causes a crash. In addition, this pointer assignment makes wl_array_release
testable.
Define a constant for the invalid memory address, and add documentation about
this behavior, starting at libwayland version 1.13.
See https://lists.freedesktop.org/archives/wayland-devel/2016-September/031116.html
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
[Pekka: remove the doc about crashing]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Yong Bakos [Tue, 27 Sep 2016 18:03:47 +0000 (13:03 -0500)]
util: Document wl_array
Add doxygen comments for wl_array and its methods.
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Yong Bakos [Fri, 23 Sep 2016 02:59:37 +0000 (21:59 -0500)]
util: Document wl_list methods
Add doxygen comment blocks to all wl_list methods.
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
[Pekka: removed "itself" as suggested by Bryce]
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Bryce Harrington [Thu, 22 Sep 2016 17:31:53 +0000 (10:31 -0700)]
configure.ac: bump version to 1.12.90 for open development
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Bryce Harrington [Tue, 20 Sep 2016 17:45:10 +0000 (10:45 -0700)]
configure.ac: bump to version 1.12.0 for the official release
Bryce Harrington [Tue, 13 Sep 2016 19:13:57 +0000 (12:13 -0700)]
configure.ac: bump to version 1.11.94 for the RC2 release
Yong Bakos [Wed, 17 Aug 2016 23:08:17 +0000 (16:08 -0700)]
server: Document display parameter
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Yong Bakos [Wed, 17 Aug 2016 23:03:31 +0000 (16:03 -0700)]
protocol: Replace '#defines' with 'macros'
The use of # within a description causes the documentation generator
to mistake C syntax with a documentation link.
Remove the # from the documentation, suppressing the warning.
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Bryce Harrington [Tue, 6 Sep 2016 21:22:03 +0000 (14:22 -0700)]
configure.ac: bump to version 1.11.93 for the RC1 release
Yong Bakos [Sun, 4 Sep 2016 20:23:05 +0000 (13:23 -0700)]
tests: Add test for wl_list_length
list-test.c did not cover wl_list_length, so add one test that specifically
tests this method.
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Yong Bakos [Sun, 4 Sep 2016 17:15:49 +0000 (10:15 -0700)]
doc: Correct docbook title
The docbook title was "The Wayland display server," which is inaccurate.
Change the title to "The Wayland Protocol".
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Bryce Harrington [Tue, 30 Aug 2016 18:40:23 +0000 (11:40 -0700)]
configure.ac: bump to version 1.11.92 for the beta release
Bryce Harrington [Tue, 16 Aug 2016 18:25:12 +0000 (11:25 -0700)]
configure.ac: bump to version 1.11.91 for the alpha release
Yong Bakos [Thu, 11 Aug 2016 21:33:05 +0000 (14:33 -0700)]
protocol: Specify upper left corner of damage rectangle
Specify x and y args as the upper left corner of the surface / buffer
damage rectangle.
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Yong Bakos [Thu, 11 Aug 2016 21:33:04 +0000 (14:33 -0700)]
protocol: Describe serial as serial number
Change "serial" to "serial number" in arg summaries, for consistency
and clarity.
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Yong Bakos [Thu, 11 Aug 2016 21:33:03 +0000 (14:33 -0700)]
protocol: Remove wl_ prefix from summary descriptions
Summary attributes sometime describe objects using their wl-prefixed type,
but more often don't.
Remove the wl_ prefix from summary descriptions, since they tend to describe
concepts.
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Yong Bakos [Thu, 11 Aug 2016 21:33:02 +0000 (14:33 -0700)]
protocol: Correct description indentation
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Yong Bakos [Thu, 11 Aug 2016 21:33:01 +0000 (14:33 -0700)]
protocol: Add missing line break
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Yong Bakos [Thu, 11 Aug 2016 21:33:00 +0000 (14:33 -0700)]
protocol: Capitalize ID for consistency
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Yong Bakos [Thu, 11 Aug 2016 21:32:59 +0000 (14:32 -0700)]
protocol: Hyphenate subsurface
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Yong Bakos [Thu, 11 Aug 2016 21:32:58 +0000 (14:32 -0700)]
protocol: Add summary attributes to request params and enum entries
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Yong Bakos [Thu, 11 Aug 2016 19:13:37 +0000 (12:13 -0700)]
server: Add doxygen comment for wl_client_for_each
Commit
596024f728b0a1292ee69a80dd72a85167870936 includes a doc comment
with a link to the wl_client_for_each macro, causing an error when generating
documentation.
Add a doc comment to wl_client_for_each, enabling the hyperlink and removing
the error.
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Giulio Camuffo [Fri, 12 Aug 2016 07:33:06 +0000 (09:33 +0200)]
Add API to install protocol loggers on the server wl_display
The new wl_display_add_protocol_logger allows to set a function as
a logger, which will get called when a new request is received or an
event is sent.
This is akin to setting WAYLAND_DEBUG=1, but more powerful because it
can be enabled at run time and allows to show the log e.g. in a UI view.
A test is added for the new functionality.
Signed-off-by: Giulio Camuffo <giulio.camuffo@kdab.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Giulio Camuffo [Thu, 11 Aug 2016 15:23:10 +0000 (17:23 +0200)]
Add API to retrieve and iterate over the resources list of a client
To complement on the new resource created signal, this allows to
iterate over the existing resources of a client.
Signed-off-by: Giulio Camuffo <giulio.camuffo@kdab.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
[Pekka: added empty lines, init ret in for_each_helper()]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Giulio Camuffo [Thu, 11 Aug 2016 15:23:09 +0000 (17:23 +0200)]
Add a resource creation signal
This change allows to add a resource creation listener to a wl_client,
which will be notified when a new resource is created for that client.
The alternative would be to have a per wl_display listener, but i think
that resources are really client specific objects, so it makes sense
to use the wl_client as the context.
Signed-off-by: Giulio Camuffo <giulio.camuffo@kdab.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
[Pekka: added wl_list_remove() in TEST(new_resource).]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Giulio Camuffo [Tue, 9 Aug 2016 10:46:53 +0000 (12:46 +0200)]
Add API to get the list of connected clients
This patch chooses the wl_list_for_each-style of iterating over
the clients, instead of using an iterator function, because i think
it is easier to use.
Signed-off-by: Giulio Camuffo <giulio.camuffo@kdab.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Giulio Camuffo [Tue, 9 Aug 2016 10:46:52 +0000 (12:46 +0200)]
Add API to retrieve the interface name of a wl_resource
Signed-off-by: Giulio Camuffo <giulio.camuffo@kdab.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Sungjae Park [Tue, 9 Aug 2016 10:46:51 +0000 (12:46 +0200)]
server: add listener API for new clients
Using display object, Emit a signal if a new client is created.
In the server-side, we can get the destroy event of a client,
But there is no way to get the created event of it.
Of course, we can get the client object from the global registry
binding callbacks.
But it can be called several times with same client object.
And even if A client creates display object,
(so there is a connection), The server could not know that.
There could be more use-cases not only for this.
Giulio: a test is added for the new functionality
Signed-off-by: Sung-jae Park <nicesj@nicesj.com>
Signed-off-by: Giulio Camuffo <giulio.camuffo@kdab.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Quentin Glidic [Tue, 5 Jul 2016 18:41:50 +0000 (20:41 +0200)]
scanner: Generate all SINCE_VERSION macros for everyone
Practical example: a client supporting version 2 of wl_output will wait
for the wl_output.done event before starting wl_output-related
operations. However, if the server only supports version 1, no event
will ever come, and it must fallback to use the wl_output.geometry event
alone.
Without this macro, it cannot check for that in a nice way.
This patch introduces the same #defines in both server and client
headers. We rely on both being generated from the same XML file and
https://gcc.gnu.org/onlinedocs/cpp/Undefining-and-Redefining-Macros.html
to not cause compiler errors or warning due to redefinitions. We also
assume that no-one uses the same name in the same interface for both a
request and an event.
If this patch does cause grief due to identical redefinitions, the
contingency plan is to change the generator to produce
#ifndef/#define/#endif instead of just #define.
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
[Pekka: add paragraphs to commit message.]
Quentin Glidic [Tue, 5 Jul 2016 18:41:49 +0000 (20:41 +0200)]
protocol: Add release (destructor) request to wl_output
Outputs come and go, and this is needed to clean up wl_resources on the
server side. All protocol objects need a way to be destroyed.
Cc: Neil Roberts <neil@linux.intel.com>
Cc: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
[Pekka: added commit message]
Yong Bakos [Mon, 18 Jul 2016 17:46:00 +0000 (12:46 -0500)]
display-test: Remove redundant stdbool include
display-test.c includes stdbool.h twice. Remove the redundant include.
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Yong Bakos [Mon, 18 Jul 2016 17:42:25 +0000 (12:42 -0500)]
(multiple): Include stdint.h
Some headers and source files have been using types such as uint32_t
without explicitly including stdint.h.
Explicitly include stdint.h where appropriate.
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Khem Raj [Fri, 15 Jul 2016 23:23:48 +0000 (16:23 -0700)]
scanner: Use uint32_t instead of uint
uint32_t is C99 defined stdint type
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Bryce Harrington [Fri, 8 Jul 2016 23:51:16 +0000 (16:51 -0700)]
scanner: Improve documentation for strtouint()
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Bryce Harrington [Sat, 9 Jul 2016 02:00:20 +0000 (19:00 -0700)]
tests: Require base 10 for the string specifying the number of open fd's
The third arg to strtol() specifies the base to assume for the number.
When 0 is passed, as is currently done in wayland-client.c, hexadecimal
and octal numbers are permitted and automatically detected and
converted.
exec-fd-leak-checker's single argument is the count of file descriptors
it should expect to be open. We should expect this to be specified only
as a decimal number, there's no reason why one would want to use octal
or hexadecimal for that.
Suggested by Yong Bakos.
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Yong Bakos [Tue, 7 Jun 2016 15:19:39 +0000 (10:19 -0500)]
scanner: Move PROGRAM_NAME define
PROGRAM_NAME was defined within the if block of HAVE_LIBXML, causing a
compilation failure when libxml is not present.
Move the define of PROGRAM_NAME out of the if block.
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Yong Bakos [Tue, 24 May 2016 23:10:17 +0000 (17:10 -0600)]
server-core, event-loop: Fix parameter alignment.
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Yong Bakos [Tue, 24 May 2016 19:55:12 +0000 (13:55 -0600)]
scanner: Replace #define tab with space
wayland-client-protocol.h and wayland-server-protocol.h use a tab
between the identifier and token of generated #defines for request/event
opcodes and versions. While this sometimes enables vertical alignment,
it more frequently doesn't, and leads to awkward spacing.
Replace the tab with a space, for consistency and readability.
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Tested-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Yong Bakos [Mon, 23 May 2016 23:59:33 +0000 (17:59 -0600)]
server, server-core: Minimize fwd decs, use macro, and format
wayland-server.h: Adjust line breaks between prototypes.
wayland-server-core.h:
Adjust line breaks between prototypes.
Adjust space between splats and identifiers.
Remove unconventional linebreak before first parameter.
Add line breaks after return types.
Remove unnecessary forward declarations, and:
- move 'struct wl_client' declaration close to the dependent typedef
- tastefully move 'wl_shm_buffer_get' to leverage the return type
Replace explicit __attribute__ with WL_PRINTF macro.
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Yong Bakos [Mon, 23 May 2016 23:06:09 +0000 (17:06 -0600)]
client-core: Add missing line breaks
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Yong Bakos [Sat, 21 May 2016 04:23:58 +0000 (22:23 -0600)]
event-loop: Include wayland-util.h
event-loop.c uses WL_EXPORT and wl_list, which are defined in
wayland-util.h.
Include wayland-util.h explicitly, rather than transitively through
wayland-server-core.h.
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Sam Spilsbury <smspillaz@gmail.com>
Yong Bakos [Sat, 21 May 2016 04:18:36 +0000 (22:18 -0600)]
wayland-shm: Include wayland-util.h
wayland-shm.c uses WL_EXPORT and wl_array, which are defined in
wayland-util.h.
Include wayland-util.h explicitly, rather than transitively through
wayland-server.h.
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Sam Spilsbury <smspillaz@gmail.com>
Bryce Harrington [Mon, 6 Jun 2016 17:58:56 +0000 (10:58 -0700)]
scanner: Fix reported executable name to 'wayland-scanner'
'wayland-scanner -v' (correctly) reports the program as named
"wayland-scanner", but 'wayland-scanner -h' was inconsistent, referring
to it as './scanner'.
Also refactor this and other references to the program name to use a
common #define, PROGRAM_NAME.
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Tested-by: Yong Bakos <ybakos@humanoriented.com>
Yong Bakos [Wed, 18 May 2016 03:02:01 +0000 (21:02 -0600)]
wayland-server: Clarify included header dependencies
wayland-server.c directly depends on wayland-util.h, and will include
wayland-server-protocol.h via wayland-server.h.
Explicitly include wayland-util.h, making this dependency clear.
Remove the redundant inclusion of wayland-server-protocol.h.
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Yong Bakos [Mon, 16 May 2016 18:05:39 +0000 (12:05 -0600)]
event-loop: Make transitive include explicit
The explicit inclusion of wayland-server.h hides the real dependency, which
is wayland-server-core.h.
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Yong Bakos [Thu, 12 May 2016 20:52:39 +0000 (15:52 -0500)]
doc: Unpublish global_zombie_object and wl_interface_equal
Both global_zombie_object and wl_interface_equal are private, yet were
part of public documentation despite not being part of the public API.
Move these two definitions to the top of an existing doxygen \cond block,
which removes them from the public documentation.
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Yong Bakos [Thu, 12 May 2016 20:52:38 +0000 (15:52 -0500)]
doc: Unpublish wl_log* and wl_abort
The public documentation included descriptions of wl_log_stderr_handler,
wl_log_func_t wl_log_handler, wl_log and wl_abort. These are not accessible
via the public API.
Move the doxygen \endcond command to wrap these definitions, removing them
from publication.
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Yong Bakos [Thu, 12 May 2016 20:52:37 +0000 (15:52 -0500)]
doc: Unpublish wl_display_get_additional_shm_formats
The Wayland docbook and the doxygen html docs had been presenting
wl_display_get_additional_shm_formats as part of the public API, but the
prototype for this function is in wayland-private.h.
Add a \private annotation to the doc comment, preventing doxygen from
publishing this function as public.
Add logic to the publican xsl to only transform elements with a "prot"
attribute value of "public".
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Pekka Paalanen [Wed, 1 Jun 2016 08:08:02 +0000 (11:08 +0300)]
configure.ac: bump version to 1.11.90 for open development
As announced in 1.11.0 release notes, master is open again.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Bryce Harrington [Wed, 1 Jun 2016 00:11:20 +0000 (17:11 -0700)]
configure.ac: bump to version 1.11.0 for the official release
Bryce Harrington [Tue, 24 May 2016 19:29:59 +0000 (12:29 -0700)]
configure.ac: bump to version 1.10.93 for the RC1 release
Yong Bakos [Fri, 20 May 2016 02:31:16 +0000 (20:31 -0600)]
scanner: Remove unused forward decs from client protocol
wayland-client-protocol.h had forward declarations for wl_client and
wl_resource, yet nothing on the client side references these types.
Add a 'side' condition to only generate these forward declarations in the
server protocol header.
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: <pekka.paalanen@collabora.co.uk>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Marek Chalupa [Fri, 13 May 2016 13:01:18 +0000 (15:01 +0200)]
display-test: move a misplaced comment
we split a function while refactoring in c643781 and now
the comment makes no sense
Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Yong Bakos [Thu, 19 May 2016 16:27:29 +0000 (10:27 -0600)]
tests: Check for client/server-core.h inclusion
The purpose of wayland-*-protocol-core.h is to mimc the
wayland-*-protocol.h generated by scanner --include-core-only.
The only difference being what wayland-*-protocol.h should include.
Add an include check in the headers-protocol-core-test, to be sure that
a wayland-*-protocol.h generated with the --include-core-only option
properly includes wayland-*-core.h.
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Bryce Harrington [Wed, 18 May 2016 05:07:48 +0000 (22:07 -0700)]
configure.ac: bump to version 1.10.92 for the beta release
Yong Bakos [Sat, 7 May 2016 14:11:30 +0000 (09:11 -0500)]
private: Remove unnecessary forward declarations
Declarations for wl_connection and wl_closure are not needed here.
wl_closure already has a complete definition.
Removing these forward declarations results in a clean, warning-free compile.
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
[Updated to apply to trunk]
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Yong Bakos [Sun, 8 May 2016 13:44:08 +0000 (08:44 -0500)]
connection: Move wl_interface_equal to util
Move the wl_interface_equal prototype to the top of wayland-private, where
it is not buried in the middle of map, connection and closure functions.
Move the implementation out of connection and into util. This is a utility
function, not specific to connections, and has call sites within connection,
wayland-client and wayland-server.
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Yong Bakos [Sun, 8 May 2016 19:42:28 +0000 (14:42 -0500)]
doc: Formalize file comment in wayland-client.h, wayland-server.h
Publican was generating a subtle error during a build:
Error: no ID for constraint linkend: Server-wayland-server-core_8h.
This was caused by doxygen applying the doc comment at the top of
wayland-server.h as the documentation for struct wl_object. As such, the
generated documentation for wl_object was also very incorrect.
Make the file doc comments in wayland-client.h and wayland-server.h real
doxygen file doc comments with the \file command, add a \brief, make the
inclusion warning a \warning, correct the language of the comment in
wayland-server.h, and remove one unnecessary line break.
This squelches the publican error, removes the bad wl_object documentation,
and makes the comment appear in the generated html documentation.
References:
d74a9c079b1aeb44f69b4132dc2c38362e21f281
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Yong Bakos [Sat, 7 May 2016 23:14:11 +0000 (18:14 -0500)]
protocol: Remove double line break
All vertical whitespace should manifest as a single blank line, never two.
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Armin Krezović [Thu, 5 May 2016 15:27:57 +0000 (17:27 +0200)]
scanner: Add version argument to wayland-scanner
This adds a command line argument to print wayland-scanner version.
It also makes wayland-scanner emit a comment with wayland library
version to every file it generates.
v2: separate variable definitions into their own lines and remove
old style "version" argument
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Tested-by: Yong Bakos <ybakos@humanoriented.com>
Signed-off-by: Armin Krezović <krezovic.armin@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Bryce Harrington [Wed, 4 May 2016 00:56:22 +0000 (17:56 -0700)]
configure.ac: bump to version 1.10.91 for the alpha release
Auke Booij [Sat, 5 Dec 2015 12:39:12 +0000 (12:39 +0000)]
protocol: add support for cross-interface enum attributes
The enum attribute, for which scanner support was introduced in
1771299, can be used to link message arguments to <enum>s. However,
some arguments refer to <enum>s in a different <interface>.
This adds scanner support for referring to an <enum> in a different
<interface> using dot notation. It also sets the attributes in this
style in the wayland XML protocol (wl_shm_pool::create_buffer::format
to wl_shm::format, and wl_surface::set_buffer_transform::transform to
wl_output::transform), and updates the documentation XSL so that this
new style is supported.
Changes since v2:
- add object:: prefix for all enumerations in the documentation
- fix whitespace in scanner.c
- minor code fixup to return early and avoid casts in scanner.c
Changes since v1:
- several implementation bugs fixed
Signed-off-by: Auke Booij <auke@tulcod.com>
Reviewed-by: Nils Christopher Brause <nilschrbrause@googlemail.com>
Reviewed-by: Bill Spitzak <spitzak@gmail.com>
[Pekka: rebased across
cde251a124d41977b447098cc530fcad2834a45f]
[Pekka: wrap lines and space fixes in scanner.c]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Yong Bakos [Sat, 30 Apr 2016 12:35:50 +0000 (07:35 -0500)]
protocol: Add summaries to event parameters
All event arg elements now have an appropriate summary attribute.
This was conducted mostly in response to the undocumented parameter
warnings generated during 'make check'.
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Eric Engestrom [Mon, 2 May 2016 08:49:37 +0000 (09:49 +0100)]
tests: fix typo
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Armin Krezović <krezovic.armin@gmail.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Eric Engestrom [Mon, 2 May 2016 08:49:36 +0000 (09:49 +0100)]
doc: fix typos
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Armin Krezović <krezovic.armin@gmail.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Eric Engestrom [Mon, 2 May 2016 08:49:35 +0000 (09:49 +0100)]
util: fix typo
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Armin Krezović <krezovic.armin@gmail.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Eric Engestrom [Mon, 2 May 2016 08:49:34 +0000 (09:49 +0100)]
server: fix typo
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Armin Krezović <krezovic.armin@gmail.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Eric Engestrom [Mon, 2 May 2016 08:49:33 +0000 (09:49 +0100)]
client: fix typo
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Armin Krezović <krezovic.armin@gmail.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Yong Bakos [Thu, 28 Apr 2016 17:01:34 +0000 (12:01 -0500)]
protocol: Hyphenate compound adjective surface-local
Remove superfluous 'local' from 'buffer local'.
In addition, simplify the phrasing of local x/y coordinates in parameter
summaries.
See https://lists.freedesktop.org/archives/wayland-devel/2016-April/028249.html.
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Yong Bakos [Thu, 28 Apr 2016 17:01:33 +0000 (12:01 -0500)]
doc: Hyphenate compound adjectives window-local, surface-local
See https://lists.freedesktop.org/archives/wayland-devel/2016-April/028249.html.
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Jonas Ådahl [Wed, 27 Apr 2016 07:37:41 +0000 (15:37 +0800)]
client: Fix wl_display_roundtrip_queue() race condition
Without this commit, wl_display_roundtrip_queue() is vulnerable to a
race condition, causing the callback to be dispatched on the wrong
queue.
The race condition happens if some non-main thread calls
wl_display_roundtrip_queue() with its thread local queue, and the main
thread reads and dispatches the callback event from the
wl_display_sync() call before the thread local queue is set.
The issue is fixed by using a proxy wrapper, making the initialization
of the callback proxy atomic, effectively making it no longer possible
for some other thread to dispatch the proxy before the correct thread
local queue is set.
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
[Pekka: check display_wrapper]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Jonas Ådahl [Fri, 29 Apr 2016 11:30:23 +0000 (19:30 +0800)]
tests/queue-test: Add tests for proxy wrappers
Test that doing wl_display.sync on a wrapped proxy with a special queue
works as expected.
Test that creating a wrapper on a destroyed but not freed proxy fails.
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Jonas Ådahl [Fri, 29 Apr 2016 11:30:22 +0000 (19:30 +0800)]
client: Introduce proxy wrappers
Using the libwayland-client client API with multiple threads with
thread local queues are prone to race conditions.
The problem is that one thread can read and queue events after another
thread creates a proxy but before it sets the queue.
This may result in the event to the proxy being silently dropped, or
potentially dispatched on the wrong thread had the creating thread set
the implementation before setting the queue.
This patch introduces API to solve this case by introducing "proxy
wrappers". In short, a proxy wrapper is a wl_proxy struct that will
never itself proxy any events, but may be used by the client to set a
queue, and use it instead of the original proxy when sending requests
that creates new proxies. When sending requests, the wrapper will
work in the same way as the normal proxy object, but the proxy created
by sending a request (for example wl_display.sync) will inherit to the
same proxy queue as the wrapper.
https://bugs.freedesktop.org/show_bug.cgi?id=91273
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Jonas Ådahl [Wed, 27 Apr 2016 06:46:54 +0000 (14:46 +0800)]
client: Make proxy_destroy a static function
proxy_destroy() is just the implementation of the atomic part of
wl_proxy_destroy(), so lets make it static.
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Marek Chalupa [Fri, 22 Apr 2016 15:46:00 +0000 (17:46 +0200)]
connection: remove redundant assignment
the code is something like:
if (object == NULL && ...) {
object = NULL;
return;
}
first, the object is already NULL, second, the assignment has no effect
since we return from the function right away
Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Yong Bakos [Tue, 5 Apr 2016 23:24:01 +0000 (18:24 -0500)]
protocol: Correct grammar and spelling
Fix grammar, spelling, tense, and other inconsistencies, based on
correctness, consistency, and precedence both here and influenced
by wayland-protocols.
- Standardize lower case for summary attribute values.
- Minor vertical whitespace removal consistency.
- Standarize references to coordinates, preferring 'surface local'
- Fix spelling, grammar, tense, and punctuation.
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Emil Velikov [Sun, 17 Apr 2016 11:29:24 +0000 (12:29 +0100)]
utils: move include directives before extern "C" wrapper
Analogous to last two commits.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Emil Velikov [Sun, 17 Apr 2016 11:29:23 +0000 (12:29 +0100)]
server: move include directives before extern "C" wrapper
Analogous to previous commit but for the server(-core) header.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Emil Velikov [Sun, 17 Apr 2016 11:29:22 +0000 (12:29 +0100)]
scanner: move include directives before extern "C" wrapper
Adding extern "C" wrapper before includes (especially system ones) is
illadvised as the headers themselves can behave diffently in that case.
See the section "Including C Headers in C++ Code" in the following
http://www.oracle.com/technetwork/articles/servers-storage-dev/mixingcandcpluspluscode-305840.html
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Eric Engestrom [Sat, 2 Apr 2016 16:04:05 +0000 (17:04 +0100)]
wayland-client: fix spelling mistake
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Eric Engestrom [Sat, 2 Apr 2016 16:04:04 +0000 (17:04 +0100)]
protocol: fix spelling mistake
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Yong Bakos [Thu, 31 Mar 2016 23:55:54 +0000 (18:55 -0500)]
scanner: Fix spacing of @param
Adds one space to the @param lines in generated .h files,
aligning the indentation with the rest of the comment block.
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Yong Bakos [Fri, 11 Mar 2016 04:31:59 +0000 (22:31 -0600)]
ignore: Add *.dtd.embed
Although autogen.sh has a --disable-dtd-validation option, it is
on by default, so it seems convenient to add the generated symlink
to .gitignore.
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>