[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

wayland: Changes to 'debian-unstable'



 .gitignore                        |    1 
 configure.ac                      |    4 
 debian/changelog                  |   12 ++
 debian/control                    |    3 
 debian/libwayland-client0.symbols |    3 
 debian/libwayland-dev.install     |    3 
 debian/libwayland-server0.symbols |    4 
 debian/source/format              |    1 
 doc/doxygen/Makefile.am           |    6 +
 doc/doxygen/wayland.doxygen.in    |    2 
 protocol/Makefile.am              |    2 
 protocol/wayland.xml              |   85 ++++++++++++++++++-
 src/connection.c                  |    9 +-
 src/scanner.c                     |    6 -
 src/wayland-client.c              |  115 +++++++++++++++++++++++---
 src/wayland-client.h              |    6 +
 src/wayland-client.pc.in          |    2 
 src/wayland-private.h             |   19 +---
 src/wayland-server.c              |   95 ++++++++++++++++++---
 src/wayland-server.h              |  115 ++++++++++++++++++++++++++
 src/wayland-server.pc.in          |    2 
 src/wayland-shm.c                 |   45 +++++++---
 src/wayland-util.h                |   85 ++++++++++++++++++-
 tests/Makefile.am                 |    6 +
 tests/resources-test.c            |  167 ++++++++++++++++++++++++++++++++++++++
 tests/signal-test.c               |  114 +++++++++++++++++++++++++
 tests/test-runner.c               |   17 +++
 27 files changed, 859 insertions(+), 70 deletions(-)

New commits:
commit fab1fc06dab9fcb16b661cc5388de3b6cfaa5e31
Author: Héctor Orón Martínez <zumbi@debian.org>
Date:   Fri Oct 11 11:26:23 2013 +0200

    Release debian version 1.3.0-1
    
    Signed-off-by: Héctor Orón Martínez <zumbi@debian.org>

diff --git a/debian/changelog b/debian/changelog
index be3adee..25d642a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,17 @@
-wayland (1.2.1-2) UNRELEASED; urgency=low
+wayland (1.3.0-1) unstable; urgency=low
 
+  [ Timo Aaltonen ]
   * control: Bump the libwayland0 C/R to (<< 1.1.0) so that it covers
     the ubuntu version too, and add it to -cursor.
 
- -- Timo Aaltonen <tjaalton@ubuntu.com>  Mon, 07 Oct 2013 10:42:39 +0300
+  [ Hector Oron ]
+  * New upstream stable release (1.3.0).
+  * Add myself to Uploaders.
+  * Switch to Debian source format 3.0 quilt.
+  * d/libwayland-dev.install:
+    - install wayland documentation
+
+ -- Hector Oron <zumbi@debian.org>  Fri, 11 Oct 2013 11:23:38 +0200
 
 wayland (1.2.1-1) unstable; urgency=low
 

commit 209114602ccec64332e2af7c2e96c5fe995a0896
Author: Héctor Orón Martínez <zumbi@debian.org>
Date:   Fri Oct 11 10:59:19 2013 +0200

    Update libwayland-server0 symbols
    
    Signed-off-by: Héctor Orón Martínez <zumbi@debian.org>

diff --git a/debian/libwayland-server0.symbols b/debian/libwayland-server0.symbols
index 4c3f94b..369bb10 100644
--- a/debian/libwayland-server0.symbols
+++ b/debian/libwayland-server0.symbols
@@ -25,6 +25,7 @@ libwayland-server.so.0 libwayland-server0 #MINVER#
  wl_data_source_interface@Base 1.0.2
  wl_display_add_destroy_listener@Base 1.0.4
  wl_display_add_global@Base 1.0.2
+ wl_display_add_shm_format@Base 1.3.0
  wl_display_add_socket@Base 1.0.2
  wl_display_create@Base 1.0.2
  wl_display_destroy@Base 1.0.2
@@ -90,9 +91,12 @@ libwayland-server.so.0 libwayland-server0 #MINVER#
  wl_resource_instance_of@Base 1.2.0
  wl_resource_post_error@Base 1.0.2
  wl_resource_post_event@Base 1.0.2
+ wl_resource_post_event_array@Base 1.3.0
  wl_resource_post_no_memory@Base 1.0.2
  wl_resource_queue_event@Base 1.0.2
+ wl_resource_queue_event_array@Base 1.3.0
  wl_resource_set_destructor@Base 1.2.0
+ wl_resource_set_dispatcher@Base 1.3.0
  wl_resource_set_implementation@Base 1.2.0
  wl_resource_set_user_data@Base 1.2.0
  wl_seat_interface@Base 1.0.2

commit 11bc97fd1bb6af4acb0379e78a0994428a2ad516
Author: Héctor Orón Martínez <zumbi@debian.org>
Date:   Fri Oct 11 10:56:47 2013 +0200

    Update libwayland-client0 symbols
    
    Signed-off-by: Héctor Orón Martínez <zumbi@debian.org>

diff --git a/debian/libwayland-client0.symbols b/debian/libwayland-client0.symbols
index 4900ad4..d83d394 100644
--- a/debian/libwayland-client0.symbols
+++ b/debian/libwayland-client0.symbols
@@ -48,13 +48,16 @@ libwayland-client.so.0 libwayland-client0 #MINVER#
  wl_map_reserve_new@Base 1.0.2
  wl_output_interface@Base 1.0.2
  wl_pointer_interface@Base 1.0.2
+ wl_proxy_add_dispatcher@Base 1.3.0
  wl_proxy_add_listener@Base 1.0.2
  wl_proxy_create@Base 1.0.2
  wl_proxy_destroy@Base 1.0.2
  wl_proxy_get_class@Base 1.1.0
  wl_proxy_get_id@Base 1.0.2
+ wl_proxy_get_listener@Base 1.3.0
  wl_proxy_get_user_data@Base 1.0.2
  wl_proxy_marshal@Base 1.0.2
+ wl_proxy_marshal_array@Base 1.3.0
  wl_proxy_set_queue@Base 1.0.2
  wl_proxy_set_user_data@Base 1.0.2
  wl_region_interface@Base 1.0.2

commit 8acacee030624378565b84bb6833cc36185fb429
Author: Héctor Orón Martínez <zumbi@debian.org>
Date:   Fri Oct 11 10:50:37 2013 +0200

    Install wayland documentation in development package
    
    Signed-off-by: Héctor Orón Martínez <zumbi@debian.org>

diff --git a/debian/libwayland-dev.install b/debian/libwayland-dev.install
index 66840ea..ced3154 100644
--- a/debian/libwayland-dev.install
+++ b/debian/libwayland-dev.install
@@ -20,3 +20,6 @@ usr/lib/*/pkgconfig/wayland-server.pc
 usr/share/pkgconfig/wayland-scanner.pc
 usr/share/aclocal/wayland-scanner.m4
 usr/share/wayland/wayland-scanner.mk
+
+# Documentation
+usr/share/wayland/wayland.xml usr/share/doc/wayland/wayland.xml

commit e84a5f0e154cb51ee28ca0f6c420ef3d23a8fe98
Author: Héctor Orón Martínez <zumbi@debian.org>
Date:   Fri Oct 11 11:20:41 2013 +0200

    Switch to Debian source format 3.0 quilt
    
    Signed-off-by: Héctor Orón Martínez <zumbi@debian.org>

diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)

commit f2d1f2ce626eabfd0130bc78c3fc4f800cf061b9
Author: Héctor Orón Martínez <zumbi@debian.org>
Date:   Fri Oct 11 11:19:13 2013 +0200

    Add myself to Uploaders.
    
    Signed-off-by: Héctor Orón Martínez <zumbi@debian.org>

diff --git a/debian/control b/debian/control
index a57aaea..546f6b6 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,8 @@ Section: x11
 Priority: optional
 Maintainer: Debian X Strike Force <debian-x@lists.debian.org>
 Uploaders: Cyril Brulebois <kibi@debian.org>,
-           Emilio Pozuelo Monfort <pochu@debian.org>
+           Emilio Pozuelo Monfort <pochu@debian.org>,
+           Héctor Orón Martínez <zumbi@debian.org>
 Build-Depends:
  debhelper (>= 9),
  quilt,

commit 2c3dbb89031f120fb191492634e53a583f99d57d
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Wed Oct 9 16:20:54 2013 -0700

    configure.ac: Bump version to 1.3

diff --git a/configure.ac b/configure.ac
index 3b79c54..fa924ae 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,8 +1,8 @@
 AC_PREREQ([2.64])
 
 m4_define([wayland_major_version], [1])
-m4_define([wayland_minor_version], [2])
-m4_define([wayland_micro_version], [92])
+m4_define([wayland_minor_version], [3])
+m4_define([wayland_micro_version], [0])
 m4_define([wayland_version],
           [wayland_major_version.wayland_minor_version.wayland_micro_version])
 

commit bb6f6faaa2acfebfe3658ae48951e1b84ed1fabf
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Mon Oct 7 21:36:31 2013 -0700

    scanner: Handle unrecognized invocation mode
    
    Print usage if we don't recognize the invocation mode.  Also fixes
    uninitialized variable warning.

diff --git a/src/scanner.c b/src/scanner.c
index d02d865..0fbaabd 100644
--- a/src/scanner.c
+++ b/src/scanner.c
@@ -1178,6 +1178,8 @@ int main(int argc, char *argv[])
 		mode = SERVER_HEADER;
 	else if (strcmp(argv[1], "code") == 0)
 		mode = CODE;
+	else
+		usage(EXIT_FAILURE);
 
 	wl_list_init(&protocol.interface_list);
 	protocol.type_index = 0;
@@ -1210,7 +1212,7 @@ int main(int argc, char *argv[])
 
 	XML_ParserFree(ctx.parser);
 
-	switch(mode) {
+	switch (mode) {
 		case CLIENT_HEADER:
 			emit_header(&protocol, 0);
 			break;

commit 260d73b449feb979d98de7d280593675f5bbddd0
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Wed Oct 2 22:14:57 2013 -0700

    configure.ac: Bump version to 1.2.92

diff --git a/configure.ac b/configure.ac
index dec94f5..3b79c54 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@ AC_PREREQ([2.64])
 
 m4_define([wayland_major_version], [1])
 m4_define([wayland_minor_version], [2])
-m4_define([wayland_micro_version], [91])
+m4_define([wayland_micro_version], [92])
 m4_define([wayland_version],
           [wayland_major_version.wayland_minor_version.wayland_micro_version])
 

commit 799ea7206b3af987e5aae7d47f86643edbbb014d
Author: Neil Roberts <neil@linux.intel.com>
Date:   Wed Sep 25 10:39:12 2013 +0100

    client: Fix handling display->reader_count if poll fails
    
    In wl_display_dispatch_queue, if poll fails then it would previously
    return immediately and leak a reference in display->reader_count. Then
    if the application ignores the error and tries to read again it will
    block forever. This can happen for example if the poll fails with
    EINTR which the application might consider to be a recoverable error.
    This patch makes it cancel the read so the reader_count will be
    decremented when poll fails.

diff --git a/src/wayland-client.c b/src/wayland-client.c
index d043459..e92317a 100644
--- a/src/wayland-client.c
+++ b/src/wayland-client.c
@@ -1210,8 +1210,10 @@ wl_display_dispatch_queue(struct wl_display *display,
 
 	pfd[0].fd = display->fd;
 	pfd[0].events = POLLIN;
-	if (poll(pfd, 1, -1) == -1)
+	if (poll(pfd, 1, -1) == -1) {
+		wl_display_cancel_read(display);
 		return -1;
+	}
 
 	pthread_mutex_lock(&display->mutex);
 

commit 4125367f20d70cdf3c14f1bcafbf46e1c6e20835
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Sun Sep 22 14:12:26 2013 -0700

    configure.ac: Bump version to 1.2.91

diff --git a/configure.ac b/configure.ac
index 5acbeef..dec94f5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@ AC_PREREQ([2.64])
 
 m4_define([wayland_major_version], [1])
 m4_define([wayland_minor_version], [2])
-m4_define([wayland_micro_version], [90])
+m4_define([wayland_micro_version], [91])
 m4_define([wayland_version],
           [wayland_major_version.wayland_minor_version.wayland_micro_version])
 

commit ba90497b872720d42a63c090be24f339679c6706
Author: Jason Ekstrand <jason@jlekstrand.net>
Date:   Fri Sep 20 08:27:06 2013 -0500

    Export the Wayland protocol XML file
    
    Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>

diff --git a/protocol/Makefile.am b/protocol/Makefile.am
index 08690b3..cc9cd1c 100644
--- a/protocol/Makefile.am
+++ b/protocol/Makefile.am
@@ -1 +1 @@
-EXTRA_DIST = wayland.xml
+dist_pkgdata_DATA = wayland.xml
diff --git a/src/wayland-client.pc.in b/src/wayland-client.pc.in
index e453018..eef61da 100644
--- a/src/wayland-client.pc.in
+++ b/src/wayland-client.pc.in
@@ -1,5 +1,7 @@
 prefix=@prefix@
 exec_prefix=@exec_prefix@
+datarootdir=@datarootdir@
+pkgdatadir=@datadir@/@PACKAGE@
 libdir=@libdir@
 includedir=@includedir@
 
diff --git a/src/wayland-server.pc.in b/src/wayland-server.pc.in
index 18a0b52..50dff53 100644
--- a/src/wayland-server.pc.in
+++ b/src/wayland-server.pc.in
@@ -1,5 +1,7 @@
 prefix=@prefix@
 exec_prefix=@exec_prefix@
+datarootdir=@datarootdir@
+pkgdatadir=@datadir@/@PACKAGE@
 libdir=@libdir@
 includedir=@includedir@
 

commit b99edb8b7e0217f5457c08ae2ef6e4227ecaccab
Author: Marek Ch <mchqwerty@gmail.com>
Date:   Wed Sep 18 17:29:50 2013 +0200

    tests: add wl_resource tests

diff --git a/tests/Makefile.am b/tests/Makefile.am
index 3806cb6..9c673ae 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -11,7 +11,8 @@ TESTS =						\
 	sanity-test				\
 	socket-test				\
 	queue-test				\
-	signal-test
+	signal-test				\
+	resources-test
 
 check_PROGRAMS =				\
 	$(TESTS)				\
@@ -34,6 +35,7 @@ sanity_test_SOURCES = sanity-test.c $(test_runner_src)
 socket_test_SOURCES = socket-test.c $(test_runner_src)
 queue_test_SOURCES = queue-test.c $(test_runner_src)
 signal_test_SOURCES = signal-test.c $(test_runner_src)
+resources_test_SOURCES = resources-test.c $(test_runner_src)
 
 fixed_benchmark_SOURCES = fixed-benchmark.c
 
diff --git a/tests/resources-test.c b/tests/resources-test.c
new file mode 100644
index 0000000..d7a428a
--- /dev/null
+++ b/tests/resources-test.c
@@ -0,0 +1,167 @@
+/*
+ * Copyright © 2013 Marek Chalupa
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that copyright
+ * notice and this permission notice appear in supporting documentation, and
+ * that the name of the copyright holders not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission.  The copyright holders make no representations
+ * about the suitability of this software for any purpose.  It is provided "as
+ * is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ */
+
+#include <assert.h>
+#include <sys/socket.h>
+#include <unistd.h>
+
+#include "wayland-server.h"
+#include "test-runner.h"
+
+TEST(create_resource_tst)
+{
+	struct wl_display *display;
+	struct wl_client *client;
+	struct wl_resource *res;
+	struct wl_list *link;
+	int s[2];
+	uint32_t id;
+
+	assert(socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, s) == 0);
+	display = wl_display_create();
+	assert(display);
+	client = wl_client_create(display, s[0]);
+	assert(client);
+
+	res = wl_resource_create(client, &wl_display_interface, 4, 0);
+	assert(res);
+
+	/* setters/getters */
+	assert(wl_resource_get_version(res) == 4);
+
+	assert(client == wl_resource_get_client(res));
+	id = wl_resource_get_id(res);
+	assert(wl_client_get_object(client, id) == res);
+
+	link = wl_resource_get_link(res);
+	assert(link);
+	assert(wl_resource_from_link(link) == res);
+
+	wl_resource_set_user_data(res, (void *) 0xbee);
+	assert(wl_resource_get_user_data(res) == (void *) 0xbee);
+
+	wl_resource_destroy(res);
+	wl_client_destroy(client);
+	wl_display_destroy(display);
+	close(s[1]);
+}
+
+static void
+res_destroy_func(struct wl_resource *res)
+{
+	assert(res);
+
+	_Bool *destr = wl_resource_get_user_data(res);
+	*destr = 1;
+}
+
+static _Bool notify_called = 0;
+static void
+destroy_notify(struct wl_listener *l, void *data)
+{
+	assert(l && data);
+	notify_called = 1;
+}
+
+TEST(destroy_res_tst)
+{
+	struct wl_display *display;
+	struct wl_client *client;
+	struct wl_resource *res;
+	int s[2];
+	unsigned id;
+	struct wl_list *link;
+
+	_Bool destroyed = 0;
+	struct wl_listener destroy_listener = {
+		.notify = &destroy_notify
+	};
+
+	assert(socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, s) == 0);
+	display = wl_display_create();
+	assert(display);
+	client = wl_client_create(display, s[0]);
+	assert(client);
+
+	res = wl_resource_create(client, &wl_display_interface, 4, 0);
+	assert(res);
+	wl_resource_set_implementation(res, NULL, &destroyed, res_destroy_func);
+	wl_resource_add_destroy_listener(res, &destroy_listener);
+
+	/* without implementation this should be ignored .. */
+	wl_resource_post_event(res, 0);
+
+	id = wl_resource_get_id(res);
+	link = wl_resource_get_link(res);
+	assert(link);
+
+	wl_resource_destroy(res);
+	assert(destroyed);
+	assert(notify_called); /* check if signal was emitted */
+	assert(wl_client_get_object(client, id) == NULL);
+
+	res = wl_resource_create(client, &wl_display_interface, 2, 0);
+	assert(res);
+	destroyed = 0;
+	notify_called = 0;
+	wl_resource_set_destructor(res, res_destroy_func);
+	wl_resource_set_user_data(res, &destroyed);
+	wl_resource_add_destroy_listener(res, &destroy_listener);
+	/* client should destroy the resource upon its destruction */
+	wl_client_destroy(client);
+	assert(destroyed);
+	assert(notify_called);
+
+	wl_display_destroy(display);
+	close(s[1]);
+}
+
+TEST(create_resource_with_same_id)
+{
+	struct wl_display *display;
+	struct wl_client *client;
+	struct wl_resource *res, *res2;
+	int s[2];
+	uint32_t id;
+
+	assert(socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, s) == 0);
+	display = wl_display_create();
+	assert(display);
+	client = wl_client_create(display, s[0]);
+	assert(client);
+
+	res = wl_resource_create(client, &wl_display_interface, 2, 0);
+	assert(res);
+	id = wl_resource_get_id(res);
+	assert(wl_client_get_object(client, id) == res);
+
+	/* this one should replace the old one */
+	res2 = wl_resource_create(client, &wl_display_interface, 1, id);
+	assert(wl_client_get_object(client, id) == res2);
+
+	wl_resource_destroy(res2);
+	wl_resource_destroy(res);
+
+	wl_client_destroy(client);
+	wl_display_destroy(display);
+	close(s[1]);
+}

commit 6f1569bd38d632fbc42062dcf3a564866bdd335f
Author: Marek Ch <mchqwerty@gmail.com>
Date:   Wed Sep 18 17:29:49 2013 +0200

    tests: add unit tests for wl_signal
    
    Test wl_signal initialization, adding and getting listeners and emitting

diff --git a/tests/Makefile.am b/tests/Makefile.am
index 54157bc..3806cb6 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -10,7 +10,8 @@ TESTS =						\
 	os-wrappers-test			\
 	sanity-test				\
 	socket-test				\
-	queue-test
+	queue-test				\
+	signal-test
 
 check_PROGRAMS =				\
 	$(TESTS)				\
@@ -32,6 +33,7 @@ map_test_SOURCES = map-test.c $(test_runner_src)
 sanity_test_SOURCES = sanity-test.c $(test_runner_src)
 socket_test_SOURCES = socket-test.c $(test_runner_src)
 queue_test_SOURCES = queue-test.c $(test_runner_src)
+signal_test_SOURCES = signal-test.c $(test_runner_src)
 
 fixed_benchmark_SOURCES = fixed-benchmark.c
 
diff --git a/tests/signal-test.c b/tests/signal-test.c
new file mode 100644
index 0000000..db83abc
--- /dev/null
+++ b/tests/signal-test.c
@@ -0,0 +1,114 @@
+/*
+ * Copyright © 2013 Marek Chalupa
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that copyright
+ * notice and this permission notice appear in supporting documentation, and
+ * that the name of the copyright holders not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission.  The copyright holders make no representations
+ * about the suitability of this software for any purpose.  It is provided "as
+ * is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ */
+
+#include <assert.h>
+
+#include "wayland-server.h"
+#include "test-runner.h"
+
+static void
+signal_notify(struct wl_listener *listener, void *data)
+{
+	/* only increase counter*/
+	++(*((int *) data));
+}
+
+TEST(signal_init)
+{
+	struct wl_signal signal;
+
+	wl_signal_init(&signal);
+
+	/* Test if listeners' list is initialized */
+	assert(&signal.listener_list == signal.listener_list.next
+		&& "Maybe wl_signal implementation changed?");
+	assert(signal.listener_list.next == signal.listener_list.prev
+		&& "Maybe wl_signal implementation changed?");
+}
+
+TEST(signal_add_get)
+{
+	struct wl_signal signal;
+
+	/* we just need different values of notify */
+	struct wl_listener l1 = {.notify = (wl_notify_func_t) 0x1};
+	struct wl_listener l2 = {.notify = (wl_notify_func_t) 0x2};
+	struct wl_listener l3 = {.notify = (wl_notify_func_t) 0x3};
+	/* one real, why not */
+	struct wl_listener l4 = {.notify = signal_notify};
+
+	wl_signal_init(&signal);
+
+	wl_signal_add(&signal, &l1);
+	wl_signal_add(&signal, &l2);
+	wl_signal_add(&signal, &l3);
+	wl_signal_add(&signal, &l4);
+
+	assert(wl_signal_get(&signal, signal_notify) == &l4);
+	assert(wl_signal_get(&signal, (wl_notify_func_t) 0x3) == &l3);
+	assert(wl_signal_get(&signal, (wl_notify_func_t) 0x2) == &l2);
+	assert(wl_signal_get(&signal, (wl_notify_func_t) 0x1) == &l1);
+
+	/* get should not be destructive */
+	assert(wl_signal_get(&signal, signal_notify) == &l4);
+	assert(wl_signal_get(&signal, (wl_notify_func_t) 0x3) == &l3);
+	assert(wl_signal_get(&signal, (wl_notify_func_t) 0x2) == &l2);
+	assert(wl_signal_get(&signal, (wl_notify_func_t) 0x1) == &l1);
+}
+
+TEST(signal_emit_to_one_listener)
+{
+	int count = 0;
+	int counter;
+
+	struct wl_signal signal;
+	struct wl_listener l1 = {.notify = signal_notify};
+
+	wl_signal_init(&signal);
+	wl_signal_add(&signal, &l1);
+
+	for (counter = 0; counter < 100; counter++)
+		wl_signal_emit(&signal, &count);
+
+	assert(counter == count);
+}
+
+TEST(signal_emit_to_more_listeners)
+{
+	int count = 0;
+	int counter;
+
+	struct wl_signal signal;
+	struct wl_listener l1 = {.notify = signal_notify};
+	struct wl_listener l2 = {.notify = signal_notify};
+	struct wl_listener l3 = {.notify = signal_notify};
+
+	wl_signal_init(&signal);
+	wl_signal_add(&signal, &l1);
+	wl_signal_add(&signal, &l2);
+	wl_signal_add(&signal, &l3);
+
+	for (counter = 0; counter < 100; counter++)
+		wl_signal_emit(&signal, &count);
+
+	assert(3 * counter == count);
+}

commit ec08c5c3e99d0167fcd2d7f808ed62a833f5e5d0
Author: Marek Ch <mchqwerty@gmail.com>
Date:   Wed Sep 18 17:29:48 2013 +0200

    tests: extended message when leak in test is detected
    
    When memory or fd leak is detected, print how many blocks of memory were
    allocated and not freed, respectively how many files were opened/unclosed.

diff --git a/tests/test-runner.c b/tests/test-runner.c
index 9c6865a..8f3d5d3 100644
--- a/tests/test-runner.c
+++ b/tests/test-runner.c
@@ -111,13 +111,24 @@ static void
 run_test(const struct test *t)
 {
 	int cur_alloc = num_alloc;
-	int cur_fds;
+	int cur_fds, num_fds;
 
 	cur_fds = count_open_fds();
 	t->run();
 	if (leak_check_enabled) {
-		assert(cur_alloc == num_alloc && "memory leak detected in test.");
-		assert(cur_fds == count_open_fds() && "fd leak detected");
+		if (cur_alloc != num_alloc) {
+			fprintf(stderr, "Memory leak detected in test. "
+				"Allocated %d blocks, unfreed %d\n", num_alloc,
+				num_alloc - cur_alloc);
+			abort();
+		}
+		num_fds = count_open_fds();
+		if (cur_fds != num_fds) {
+			fprintf(stderr, "fd leak detected in test. "
+				"Opened %d files, unclosed %d\n", num_fds,
+				num_fds - cur_fds);
+			abort();
+		}
 	}
 	exit(EXIT_SUCCESS);
 }

commit 5cf31443c50fd0c2b2ebe6059f725d1c554c3647
Author: Chang Liu <cl91tp@gmail.com>
Date:   Wed Sep 18 10:45:06 2013 +0000

    client: fix an inconsistency in documentation
    
    The errno is set to EAGAIN when there are undispatched events, according
    to L1066 of wayland-client.c.

diff --git a/src/wayland-client.c b/src/wayland-client.c
index 04d988b..d043459 100644
--- a/src/wayland-client.c
+++ b/src/wayland-client.c
@@ -1087,7 +1087,7 @@ wl_display_prepare_read_queue(struct wl_display *display,
  * calls wl_display_read_events(), no other thread will read from the
  * file descriptor.  This only succeeds if the event queue is empty
  * though, and if there are undispatched events in the queue, -1 is
- * returned and errno set to EBUSY.
+ * returned and errno set to EAGAIN.
  *
  * If a thread successfully calls wl_display_prepare_read(), it must
  * either call wl_display_read_events() when it's ready or cancel the

commit 5a925532374ebb955bf7a51357b19314a74aeae5
Author: Aaron Faanes <dafrito@gmail.com>
Date:   Tue Sep 17 16:44:24 2013 -0500

    doc: Slight tweaks to wl_listener
    
    Prefer \comment over // in code blocks for consistency's sake and keep
    variable definitions separated by a line from the rest of the body.

diff --git a/src/wayland-server.h b/src/wayland-server.h
index 997e6c7..c93987d 100644
--- a/src/wayland-server.h
+++ b/src/wayland-server.h
@@ -143,17 +143,18 @@ wl_client_post_no_memory(struct wl_client *client);
  * listener should be done through provided accessor methods. A listener can
  * only listen to one signal at a time.
  *
- * \code
+ * ~~~
  * struct wl_listener your_listener;
+ *
  * your_listener.notify = your_callback_method;
  *
- * // Direct access
+ * \comment{Direct access}
  * wl_signal_add(&some_object->destroy_signal, &your_listener);
  *
- * // Accessor access
+ * \comment{Accessor access}
  * wl_event_loop *loop = ...;
  * wl_event_loop_add_destroy_listener(loop, &your_listener);
- * \endcode
+ * ~~~
  *
  * If the listener is part of a larger struct, #wl_container_of can be used
  * to retrieve a pointer to it:
@@ -162,6 +163,7 @@ wl_client_post_no_memory(struct wl_client *client);
  * void your_listener(struct wl_listener *listener, void *data)
  * {
  * 	struct your_data *data = NULL;
+ *
  * 	your_data = wl_container_of(listener, data, your_member_name);
  * }
  * \endcode

commit 8267f283dccaf26ccb28a8161c5f4ff703c86cf0
Author: Aaron Faanes <dafrito@gmail.com>
Date:   Tue Sep 17 16:42:43 2013 -0500

    utils: Document wl_container_of

diff --git a/src/wayland-util.h b/src/wayland-util.h
index aa74512..68d91e2 100644
--- a/src/wayland-util.h
+++ b/src/wayland-util.h
@@ -116,6 +116,41 @@ int wl_list_length(const struct wl_list *list);
 int wl_list_empty(const struct wl_list *list);
 void wl_list_insert_list(struct wl_list *list, struct wl_list *other);
 
+/**
+ * Retrieves a pointer to the containing struct of a given member item.
+ *
+ * This macro allows conversion from a pointer to a item to its containing
+ * struct. This is useful if you have a contained item like a wl_list,
+ * wl_listener, or wl_signal, provided via a callback or other means and would
+ * like to retrieve the struct that contains it.
+ *
+ * To demonstrate, the following example retrieves a pointer to
+ * `example_container` given only its `destroy_listener` member:
+ *
+ * ~~~
+ * struct example_container {
+ *     struct wl_listener destroy_listener;
+ *     \comment{other members...}
+ * };
+ *
+ * void example_container_destroy(struct wl_listener *listener, void *data)
+ * {
+ *     struct example_container *ctr = NULL;
+ *
+ *     ctr = wl_container_of(listener, ctr, destroy_listener);
+ *     \comment{destroy ctr...}
+ * }
+ * ~~~
+ *
+ * \param ptr A valid pointer to the contained item.
+ *
+ * \param sample A pointer to the type of content that the list item stores.
+ * Sample does not need be a valid pointer; a null pointer will suffice.
+ *
+ * \param member The named location of ptr within the sample type.
+ *
+ * \return The container for the specified pointer.
+ */
 #ifdef __GNUC__
 #define wl_container_of(ptr, sample, member)				\
 	(__typeof__(sample))((char *)(ptr)	-			\

commit 217909c18d0a7f8a4e91c9a56ccec3b75ca6d532
Author: Aaron Faanes <dafrito@gmail.com>
Date:   Tue Sep 17 16:40:49 2013 -0500

    doc: Create \comment alias for C-style comments
    
    Since /* */ do not nest, documentation is forced to either use C++ style
    // comments or some other foreign notation. This commit provides an alias
    that allows C-style comments to be introduced in code blocks that support
    aliases.
    
    It should be noted that this macro will not work within \code blocks, as
    Doxygen commands are ignored there. Instead, Doxygen's fenced code
    blocks (created via ~~~) must be used for proper output. To demonstrate:
    
    ~~~
    struct example_node {
            int id;
            \comment{Other members ...}
    };
    ~~~
    
    will roughly yield the following HTML (excluding syntax highlighting):
    
    <pre>
    struct example_node {
            int id;
            /* Other members ... */
    };
    </pre>

diff --git a/doc/doxygen/wayland.doxygen.in b/doc/doxygen/wayland.doxygen.in
index 7a2ac62..dd98594 100644
--- a/doc/doxygen/wayland.doxygen.in
+++ b/doc/doxygen/wayland.doxygen.in
@@ -193,7 +193,7 @@ TAB_SIZE               = 8
 # will result in a user-defined paragraph with heading "Side Effects:".
 # You can put \n's in the value part of an alias to insert newlines.
 
-ALIASES                =
+ALIASES                += comment{1}="/* \1 *<!-- -->/"
 
 # This tag can be used to specify a number of word-keyword mappings (TCL only).
 # A mapping has the form "name=value". For example adding

commit 2e3af5e5d71c3fca1b8823488985572a96ca1a0b
Author: Aaron Faanes <dafrito@gmail.com>
Date:   Sun Sep 15 13:37:09 2013 -0500

    doc: Include wayland-util.* for doxygen output
    
    This commit creates a shared file list that is included by both the
    client and the server for the XML Makefile targets, as classes within
    util are used by both the client and the server.

diff --git a/doc/doxygen/Makefile.am b/doc/doxygen/Makefile.am
index ec43519..0351c1e 100644
--- a/doc/doxygen/Makefile.am
+++ b/doc/doxygen/Makefile.am
@@ -2,11 +2,17 @@
 noinst_DATA = xml/client/index.xml xml/server/index.xml
 dist_noinst_DATA = wayland.doxygen.in
 
+scanned_src_files_shared = 				\
+	$(top_srcdir)/src/wayland-util.c	\
+	$(top_srcdir)/src/wayland-util.h
+
 scanned_src_files_client = 				\
+	$(scanned_src_files_shared)			\
 	$(top_srcdir)/src/wayland-client.c	\
 	$(top_srcdir)/src/wayland-client.h
 
 scanned_src_files_server = 				\
+	$(scanned_src_files_shared)			\
 	$(top_srcdir)/src/wayland-server.c	\
 	$(top_srcdir)/src/wayland-server.h
 

commit 5197aa30c81c076d018641fc6199d64431d518a4
Author: Aaron Faanes <dafrito@gmail.com>
Date:   Sun Sep 15 13:37:08 2013 -0500

    wayland-server: Improve wording for wl_signal_get's doc
    
    The old description was a bit vague; this commit hopefully improves
    describing what is returned.

diff --git a/src/wayland-server.h b/src/wayland-server.h
index 2e616c1..997e6c7 100644
--- a/src/wayland-server.h
+++ b/src/wayland-server.h
@@ -221,7 +221,7 @@ wl_signal_add(struct wl_signal *signal, struct wl_listener *listener)
 	wl_list_insert(signal->listener_list.prev, &listener->link);
 }
 
-/** Gets the list item for the specified listener.
+/** Gets the listener struct for the specified callback.
  *
  * \param signal The signal that contains the specified listener
  * \param notify The listener that is the target of this search

commit fffcdb25deb51bcb3698563f30c5b4882e3ff107
Author: Aaron Faanes <dafrito@gmail.com>
Date:   Sun Sep 15 13:37:07 2013 -0500

    utils: Add doxygen for wayland-util.h
    
    This is needed for doxygen to generate output for macro definitions, such
    as wl_container_of, that are contained by this file. Classes like
    wl_list would be documented regardless.

diff --git a/src/wayland-util.h b/src/wayland-util.h
index de2e464..aa74512 100644
--- a/src/wayland-util.h
+++ b/src/wayland-util.h
@@ -20,6 +20,11 @@
  * OF THIS SOFTWARE.
  */
 
+/** \file wayland-util.h
+ *
+ * \brief Utility classes, functions, and macros.
+ */
+
 #ifndef WAYLAND_UTIL_H
 #define WAYLAND_UTIL_H
 

commit bc30c5eb8a88f4e99555de72d4b098d1cb1efdf1
Author: Aaron Faanes <dafrito@gmail.com>
Date:   Sun Sep 15 13:37:06 2013 -0500

    utils: Reference some useful methods in wl_signal's doxygen


Reply to: