Commit Graph

1283 Commits

Author SHA1 Message Date
Matthias Clasen
a4d2b00ae2 docs: Add details about surfaces
Mention some of the characteristic differences to X:
no global positions, no access to foreign windows.
2013-04-01 19:59:48 -04:00
Matthias Clasen
ab6d96c8c4 docs: Improve wl_region protocol docs
Just cosmetic changes, a few missing periods, and ID was
not capitalized.
2013-04-01 19:59:38 -04:00
Matthias Clasen
4c94024af5 docs: Improve the wl_output protocol docs
Some descriptions were missing.
2013-04-01 19:59:12 -04:00
Matthias Clasen
27eacf423a docs: Improve wl_touch protocol docs
Some descriptions were missing here.
2013-04-01 19:58:06 -04:00
Matthias Clasen
608d81bfd5 docs: Improve wl_keyboard protocol docs
Some descriptions were missing here.
2013-04-01 19:57:28 -04:00
Matthias Clasen
3f4008acb3 docs: Improve wl_pointer protocol docs
Some descriptions were missing here.
2013-04-01 19:56:41 -04:00
Matthias Clasen
53b57a63ee docs: Improve the wl_seat protocol docs
Expand the main description and tell if requests don't have
an effect.
2013-04-01 17:43:31 -04:00
Matthias Clasen
c63a59b802 docs: Improve wl_surface protocol docs
Use NULL consistently. And add some more information in a few
places.
2013-04-01 17:40:14 -04:00
Matthias Clasen
e38f433313 docs: Improve wl_shell/wl_shell_surface docs
Add missing summaries, expand descriptions.
2013-04-01 17:40:14 -04:00
Matthias Clasen
15ec6219e9 docs: Improve the wl_data_* procol docs
Add a few missing summaries and descriptions, spell out file
descriptor, use hyphens in drag-and-drop, don't use hyphens in
'mime type', and reword a few things.
2013-04-01 17:40:14 -04:00
Matthias Clasen
b02e58c718 docs: Improve wl_shm and wl_shm_pool protocol docs
Reword some paragraphs, and spell out 'file descriptor'.
2013-04-01 17:40:14 -04:00
Matthias Clasen
c84155d475 docs: Improve wl_callback protocol docs
Add some information about wl_callback and its done event.
2013-04-01 17:40:14 -04:00
Matthias Clasen
8aa7a690a5 docs: Improve the wl_registry protocol docs
Reword a few things, and add some details.
2013-04-01 17:40:14 -04:00
Matthias Clasen
a5cc5b32bb docs: Improve wl_display protocol docs
This adds a bit of information about in-order event delivery,
removes extraneous formatting, and adds a missing period.
2013-04-01 17:40:14 -04:00
Matthias Clasen
8d0b577310 docs: Consistency fixes
Say 'object ID' throughout.
2013-04-01 17:40:14 -04:00
Matthias Clasen
390e7a7a42 doc: Improve various sections of the documentation 2013-04-01 17:40:14 -04:00
Matthias Clasen
469c386338 docs: Improve the 'Connect time' section
Turn the bullet-point list into complete sentences.
2013-04-01 17:40:14 -04:00
Matthias Clasen
41d44af8c8 docs: Improve the 'Types of Compositors' section
Turn the bullet-point lists into full paragraphs.
2013-04-01 17:40:14 -04:00
Matthias Clasen
c255bab1ed docs: Slight rewording
The Wayland Protocol -> Wayland Protocol Overview, to align
better with the subsequent Wayland Protocol Specification.
2013-04-01 17:40:13 -04:00
Matthias Clasen
49e2d5af76 docs: Reorder some sections
Move the 'Types of Compositors' section right after the Overview,
and move the 'Client API' part after the protocol spec.
2013-04-01 17:40:13 -04:00
Rob Bradford
8680c67c47 wayland-server: Avoid deferencing a NULL pointer in error case
Reorder the error handling in the case that closure is NULL due to ENOMEM to
ensure that we can safely call wl_closure_lookup_objects on the second test.
Prior to this reordering the closure would be deferenced in the ENOMEM case
due to the invocation of the second half of the logical OR check.
2013-04-01 17:16:29 -04:00
Matthias Clasen
728b64189b docs: Fix the documentation build
The publican man page says that the options are actually called
--formats and --langs, and with this, the doc build succeeds.
2013-03-28 14:01:12 -04:00
Matthias Clasen
dc206a96dc docs: Add a revision history
Publican complains if it can't find this file.
2013-03-28 14:01:12 -04:00
Pekka Paalanen
7165bf2191 protocol: remove implicit attach semantics
To match the Weston commit e7144fd175d1d68b91aa0cec7ab63381b79385a9:
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Mon Mar 4 12:11:41 2013 -0500

    compositor: Only send release event in response to wl_surface.attach

Remove the implicit attach semantics from wl_surface.commit and .attach.

Before, if you did this on a wl_surface: attach, commit, commit, you
would receive wl_buffer.release for both commits. After this change, you
will only receive wl_buffer.release for the first commit. To get a
second release, the same buffer must be attached again.

There is no need for the implicit attach on the second commit. If the
compositor needs the wl_buffer for repainting, it will not release it to
begin with. If the compositor does not need to keep the wl_buffer around
for repainting, it will not need it for a new commit either.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2013-03-19 16:49:20 -04:00
Jason Ekstrand
bedc3432ff Add wl_resource_init and use it in libwayland implementations of data sharing and SHM
This commit adds a wl_resource_init function for initializing wl_resource
structures similar to wl_client_add_object.

From this commit forward, wl_resource structures should not be initialized
manually, but should use wl_resource_init.  In the event of a change to the
wl_resource structure, this allows us to protect against regressions by filling
in added fields with reasonable defaults.  In this way, while changing
wl_object or wl_resource still constitutes an ABI break, compositors following
this rule will only need to be recompiled in order to properly link against the
new version.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
2013-03-18 23:04:32 -04:00
Jason Ekstrand
ca5b1946cb Change wl_closure_invoke to take an opcode instead of an actual function pointer
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
2013-03-18 23:04:32 -04:00
Jonas Ådahl
cb73bffed5 client: Invoke new_id closure arguments as pointers instead of integers
This commit adds a flags parameter to wl_closure_invoke(). The so far
added flags are ment to specify if the invokation is client side or
server side. When on the server side, closure arguments of type 'new_id'
should be invoked as a integer id while on the client side they should
be invoked as a pointer to a proxy object.

This fixes a bug happening when the address of a client side 'new_id'
proxy object did not fit in a 32 bit integer.

krh: Squashed test suite compile fix from Jason Ekstrand.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2013-03-17 16:39:48 -04:00
Jonas Ådahl
e053a56251 client: Check reference count only for destroyed proxies
The llvm static analyzer tool reported "Use of memory after it is freed"
in dispatch_event() because the proxy is used after being freed if the
reference count reaches zero without the destroyed flag being set. This
would never happen in practice because the owner of the proxy object
always holds a reference until calling wl_proxy_destroy() which would
also set the destroyed flag.

Since this is the case, it is safe to do the reference count check only
if the destroyed flag is set, as it can never reach zero if not.

This commit doesn't change the behavior of the function, but makes the
static analyzer more happy.

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=61385

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2013-03-17 16:24:02 -04:00
Kristian Høgsberg
9a2fab49e5 configure.ac: Use wayland_version macro in bug url 2013-03-17 13:53:29 -04:00
Kristian Høgsberg
8f1386fb50 Stylistic nitpicking
No space between '!' and its argument, 	prefer i++ over ++i.
2013-02-26 13:40:38 -05:00
Jason Ekstrand
2fc248dc2c Clean up and refactor wl_closure and associated functions
The primary purpose of this patch is to clean up wl_closure and separate
closure storage, libffi, and the wire format.  To that end, a number of changes
have been made:

 - The maximum number of closure arguments has been changed from a magic number
   to a #define WL_CLOSURE_MAX_ARGS

 - A wl_argument union has been added for storing a generalized closure
   argument and wl_closure has been converted to use wl_argument instead of the
   combination of libffi, the wire format, and a dummy extra buffer.  As of
   now, the "extra" field in wl_closure should be treated as bulk storage and
   never direclty referenced outside of wl_connection_demarshal.

 - Everything having to do with libffi has been moved into wl_closure_invoke
   and the convert_arguments_to_ffi helper function.

 - Everything having to do with the wire format has been restricted to
   wl_connection_demarshal and the new static serialize_closure function.  The
   wl_closure_send and wl_closure_queue functions are now light wrappers around
   serialize_closure.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
2013-02-26 11:31:55 -05:00
Pekka Paalanen
a51ed6d50f client: add wl_proxy_get_class()
This is a useful shorthand for client application debugging macros,
since you can ask the object class from the object itself.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2013-02-26 11:28:21 -05:00
Kristian Høgsberg
b581d13a7e scanner: Fix 'destroy)' typo in check for destroy request presence
This is there to enforce that we don't have interfaces with a destroy
request that isn't a destructor.  The check never worked because of the
typo, but we also don't have any interfaces like that.
2013-02-25 16:01:38 -05:00
Ran Benita
f53f42a1e7 scanner: remove list_length in favor of wl_list_length 2013-02-25 13:12:27 -05:00
Kristian Høgsberg
df1a934b8b configure.ac: Update bug URL 2013-02-14 17:00:46 -05:00
Armin K
9c7fb931c9 Make sure that man page xml files are always disted 2013-02-14 14:44:08 -05:00
Siddharth Heroor
d4bfbdb9b5 README: Fix typos
Signed-off-by: Siddharth Heroor <heroor@gmail.com>
2013-02-14 12:14:54 -05:00
Kristian Høgsberg
13d5271b47 tests: Add a help message for the test runner
In case we forget the name of the test case or typo it, the test runner
will now list the test cases in the test binary.
2013-02-11 13:58:39 -05:00
Kristian Høgsberg
adcb2d73b3 queue-test: WEXITSTATUS() is undefined if WIFEXITED() is false
If a child process dies from a signal, WIFEXITED() returns false and
WEXITSTATUS() isn't well-defined.  In this case, if the client segfaults,
the status is 134 and WEXITSTATUS(134) is EXIT_SUCCESS, so we mask the error.
2013-02-08 11:38:59 -05:00
Kristian Høgsberg
f02f82ef78 connection.c: Align pointer extra storage correctly
Most extra data are just pointers, but in case of fds we store an int in
the extra space.  That can cause un-aligned access to pointers on 64 bit
architectures.  Make sure we always align pointer storage correctly.
2013-02-04 07:07:17 -05:00
Kristian Høgsberg
9d2db599e7 configure.ac: Lower git master version to 1.0.90
The idea was to use 1.1.0 for the git master version, so that git master
would always be newer than any release or 1.1.x version.  This means
we have to skip 1.1 as a release, which turns out to be confusing.

We can just use version 1.0.90 instead, which lets us call the next
release 1.1.0.
2013-02-02 10:44:32 -05:00
Kristian Høgsberg
dd7ef2e17d Match libtool version info in 1.0 branch
Master should always as old or older than the stable branch.  I didn't
copy over the libtool version bump when we bumped it in the 1.0 branch.
2013-01-28 15:27:38 -05:00
David Herrmann
66d55ab3c3 gitignore: add test-suite files
The *.log and *.trs files should be ignored by git as well as the GNU
autotools ./test-driver helper script.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2013-01-24 16:14:52 -05:00
David Herrmann
142aa4a119 event-loop: fix returning the destroy-signal listener
We need to actually return the destroy-listener, otherwise the return
value is undefined.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2013-01-24 16:14:33 -05:00
Jason Ekstrand
2423497b99 Add a destroy signal to the wl_event_loop object 2013-01-15 14:05:27 -05:00
Jason Ekstrand
31511d0ea0 Added a destroy signal to the wl_display object.
Added a destroy signal to the wl_display object.
2013-01-11 15:52:39 -05:00
Quentin Glidic
0d2c233e15 test/event-loop: Check readable state on a pipe
When redirecting stdout to a non-readable file makes the test fail as a
false negative
2013-01-11 15:12:45 -05:00
Pekka Paalanen
812bd4dd0f client: remove two unused function pointer typedefs
The need for wl_display_update_func_t was removed in

commit 53d24713a3
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Thu Oct 4 16:54:22 2012 -0400

    Change filedescriptor API to be thread safe

and wl_callback_func_t does not seem to have ever been used in the first place.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-12-12 11:04:53 -05:00
Pekka Paalanen
bfdf44ec48 tests: rename temporary files
This is libwayland, not weston, so call the temporary files
wayland-tests-*, not weston-tests-*.

This is a candidate for the stable branch.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-12-03 10:10:22 -05:00
Sven Joachim
7415e8eb05 tests: Don't leave temporary files behind
Signed-off-by: Sven Joachim <svenjoac@gmx.de>
2012-12-03 09:55:58 -05:00