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

wayland: Changes to 'upstream-unstable'



Rebased ref, commits from common ancestor:
commit cf17fdf8b8cf7bb30eed31c9fedaee2a1b704501
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Thu Jan 24 20:33:31 2013 -0500

    configure.ac: Bump version to 1.0.5
    
    Also update the bug URL to point to the right component and version.

diff --git a/configure.ac b/configure.ac
index c281125..436d912 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,13 +2,13 @@ AC_PREREQ([2.64])
 
 m4_define([wayland_major_version], [1])
 m4_define([wayland_minor_version], [0])
-m4_define([wayland_micro_version], [4])
+m4_define([wayland_micro_version], [5])
 m4_define([wayland_version],
           [wayland_major_version.wayland_minor_version.wayland_micro_version])
 
 AC_INIT([wayland],
         [wayland_version],
-        [https://bugs.freedesktop.org/enter_bug.cgi?product=wayland],
+        [https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=wayland&version=1.0.5],
         [wayland],
         [http://wayland.freedesktop.org/])
 

commit 0fb588ed15d255ac1a453269b56f427264084307
Author: Armin K <krejzi@email.com>
Date:   Thu Feb 14 14:44:08 2013 -0500

    Make sure that man page xml files are always disted

diff --git a/doc/man/Makefile.am b/doc/man/Makefile.am
index 1407953..41665eb 100644
--- a/doc/man/Makefile.am
+++ b/doc/man/Makefile.am
@@ -12,15 +12,14 @@ MANPAGES_ALIASES = \
 XML_FILES = \
 	${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,$(MANPAGES)}}}}
 CLEANFILES =
-EXTRA_DIST =
-man_MANS =
+EXTRA_DIST = $(XML_FILES)
 
 if HAVE_XSLTPROC
 if HAVE_MANPAGES_STYLESHEET
 
 CLEANFILES += $(MANPAGES) $(MANPAGES_ALIASES)
-EXTRA_DIST += $(MANPAGES) $(MANPAGES_ALIASES) $(XML_FILES)
-man_MANS += $(MANPAGES) $(MANPAGES_ALIASES)
+EXTRA_DIST += $(MANPAGES) $(MANPAGES_ALIASES)
+dist_man_MANS = $(MANPAGES) $(MANPAGES_ALIASES)
 
 XSLTPROC_FLAGS = \
 	--stringparam man.authors.section.enabled 0 \

commit 1c156209ce571268947b0c9be914beefddbeebda
Author: Siddharth Heroor <heroor@gmail.com>
Date:   Thu Feb 14 10:59:15 2013 +0530

    README: Fix typos
    
    Signed-off-by: Siddharth Heroor <heroor@gmail.com>

diff --git a/README b/README
index 5f85888..ca26cc0 100644
--- a/README
+++ b/README
@@ -3,7 +3,7 @@ What is Wayland
 Wayland is a project to define a protocol for a compositor to talk to
 its clients as well as a library implementation of the protocol.  The
 compositor can be a standalone display server running on Linux kernel
-modesetting and evdev input devices, an X applications, or a wayland
+modesetting and evdev input devices, an X application, or a wayland
 client itself.  The clients can be traditional applications, X servers
 (rootless or fullscreen) or other display servers.
 
@@ -19,7 +19,7 @@ themselves, typically through cairo or OpenGL.
 
 The weston compositor is a reference implementation of a wayland
 compositor and the weston repository also includes a few example
-clients clients.
+clients.
 
 Building the wayland libraries is fairly simple, aside from libffi,
 they don't have many dependencies:
@@ -32,4 +32,4 @@ they don't have many dependencies:
 
 where PREFIX is where you want to install the libraries.  See
 http://wayland.freedesktop.org for more complete build instructions
-for wayland, weston, xwayland and various toolkits.
\ No newline at end of file
+for wayland, weston, xwayland and various toolkits.

commit acf1efe1f4c03aead1bd74ca1d8a8c39363fd255
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Mon Feb 11 13:58:39 2013 -0500

    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.

diff --git a/tests/test-runner.c b/tests/test-runner.c
index 8c79dff..9c6865a 100644
--- a/tests/test-runner.c
+++ b/tests/test-runner.c
@@ -90,6 +90,24 @@ find_test(const char *name)
 }
 
 static void
+usage(const char *name, int status)
+{
+	const struct test *t;
+
+	fprintf(stderr, "Usage: %s [TEST]\n\n"
+		"With no arguments, run all test.  Specify test case to run\n"
+		"only that test without forking.  Available tests:\n\n",
+		name);
+
+	for (t = &__start_test_section; t < &__stop_test_section; t++)
+		fprintf(stderr, "  %s\n", t->name);
+
+	fprintf(stderr, "\n");
+
+	exit(status);
+}
+
+static void
 run_test(const struct test *t)
 {
 	int cur_alloc = num_alloc;
@@ -119,11 +137,14 @@ int main(int argc, char *argv[])
 
 	leak_check_enabled = !getenv("NO_ASSERT_LEAK_CHECK");
 
+	if (argc == 2 && strcmp(argv[1], "--help") == 0)
+		usage(argv[0], EXIT_SUCCESS);
+
 	if (argc == 2) {
 		t = find_test(argv[1]);
 		if (t == NULL) {
 			fprintf(stderr, "unknown test: \"%s\"\n", argv[1]);
-			exit(EXIT_FAILURE);
+			usage(argv[0], EXIT_FAILURE);
 		}
 
 		run_test(t);

commit a02fdef0d9a34d13927cff5707024366805a78c1
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Fri Feb 8 11:38:59 2013 -0500

    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.

diff --git a/tests/queue-test.c b/tests/queue-test.c
index 681ac24..3abb71f 100644
--- a/tests/queue-test.c
+++ b/tests/queue-test.c
@@ -212,7 +212,7 @@ sigchld_handler(int signal_number, void *data)
 	int status;
 
 	waitpid(-1, &status, 0);
-	display->child_exit_status = WEXITSTATUS(status);
+	display->child_exit_status = status;
 
 	wl_display_terminate(display->display);
 
@@ -282,5 +282,6 @@ TEST(queue)
 	wl_event_source_remove(signal_source);
 	wl_display_destroy(display.display);
 
-	assert(display.child_exit_status == EXIT_SUCCESS);
+	assert(WIFEXITED(display.child_exit_status) &&
+	       WEXITSTATUS(display.child_exit_status) == EXIT_SUCCESS);
 }

commit a98cfc029bd4ce9ce0b60c73ee192ec75273a8d5
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Mon Feb 4 07:07:17 2013 -0500

    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.

diff --git a/src/connection.c b/src/connection.c
index 141875e..8707d40 100644
--- a/src/connection.c
+++ b/src/connection.c
@@ -378,23 +378,28 @@ wl_connection_queue(struct wl_connection *connection,
 	return 0;
 }
 
+#define ALIGN(p, s) (void *) ( ((intptr_t) (p) + ((s) - 1)) & ~((s) - 1) )
+
 static int
 wl_message_size_extra(const struct wl_message *message)
 {
-	int i, extra;
-
-	for (i = 0, extra = 0; message->signature[i]; i++) {
+	char *extra;
+	int i;
 
+	for (i = 0, extra = NULL; message->signature[i]; i++) {
 		switch (message->signature[i]) {
 		case 's':
 		case 'o':
 		case 'n':
+			extra = ALIGN(extra, sizeof (void *));
 			extra += sizeof (void *);
 			break;
 		case 'a':
+			extra = ALIGN(extra, sizeof (void *));
 			extra += sizeof (void *) + sizeof (struct wl_array);
 			break;
 		case 'h':
+			extra = ALIGN(extra, sizeof (int));
 			extra += sizeof (int);
 			break;
 		default:
@@ -402,7 +407,7 @@ wl_message_size_extra(const struct wl_message *message)
 		}
 	}
 
-	return extra;
+	return (intptr_t) extra;
 }
 
 static int
@@ -501,6 +506,7 @@ wl_closure_vmarshal(struct wl_object *sender,
 			*p++ = va_arg(ap, int32_t);
 			break;
 		case 's':
+			extra = ALIGN(extra, sizeof (void *));
 			closure->types[i] = &ffi_type_pointer;
 			closure->args[i] = extra;
 			sp = (const char **) extra;
@@ -527,6 +533,7 @@ wl_closure_vmarshal(struct wl_object *sender,
 			p += aligned / sizeof *p;
 			break;
 		case 'o':
+			extra = ALIGN(extra, sizeof (void *));
 			closure->types[i] = &ffi_type_pointer;
 			closure->args[i] = extra;
 			objectp = (struct wl_object **) extra;
@@ -557,6 +564,7 @@ wl_closure_vmarshal(struct wl_object *sender,
 			break;
 
 		case 'a':
+			extra = ALIGN(extra, sizeof (void *));
 			closure->types[i] = &ffi_type_pointer;
 			closure->args[i] = extra;
 			arrayp = (struct wl_array **) extra;
@@ -589,6 +597,7 @@ wl_closure_vmarshal(struct wl_object *sender,
 			break;
 
 		case 'h':
+			extra = ALIGN(extra, sizeof (int));
 			closure->types[i] = &ffi_type_sint;
 			closure->args[i] = extra;
 			fd_ptr = (int *) extra;
@@ -715,6 +724,7 @@ wl_connection_demarshal(struct wl_connection *connection,
 				goto err;
 			}
 
+			extra = ALIGN(extra, sizeof (void *));
 			s = (char **) extra;
 			extra += sizeof *s;
 			closure->args[i] = s;
@@ -736,6 +746,7 @@ wl_connection_demarshal(struct wl_connection *connection,
 			break;
 		case 'o':
 			closure->types[i] = &ffi_type_pointer;
+			extra = ALIGN(extra, sizeof (void *));
 			id = (uint32_t **) extra;
 			extra += sizeof *id;
 			closure->args[i] = id;
@@ -753,6 +764,7 @@ wl_connection_demarshal(struct wl_connection *connection,
 			break;
 		case 'n':
 			closure->types[i] = &ffi_type_pointer;
+			extra = ALIGN(extra, sizeof (void *));
 			id = (uint32_t **) extra;
 			extra += sizeof *id;
 			closure->args[i] = id;
@@ -789,6 +801,7 @@ wl_connection_demarshal(struct wl_connection *connection,
 				goto err;
 			}
 
+			extra = ALIGN(extra, sizeof (void *));
 			array = (struct wl_array **) extra;
 			extra += sizeof *array;
 			closure->args[i] = array;
@@ -804,6 +817,7 @@ wl_connection_demarshal(struct wl_connection *connection,
 		case 'h':
 			closure->types[i] = &ffi_type_sint;
 
+			extra = ALIGN(extra, sizeof (int));
 			fd = (int *) extra;
 			extra += sizeof *fd;
 			closure->args[i] = fd;

commit 9ebb18418a1c3dccc19d3931766240b54227f131
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Thu Jan 24 20:33:31 2013 -0500

    configure.ac: Bump version to 1.0.4

diff --git a/configure.ac b/configure.ac
index 571ca97..c281125 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], [0])
-m4_define([wayland_micro_version], [3])
+m4_define([wayland_micro_version], [4])
 m4_define([wayland_version],
           [wayland_major_version.wayland_minor_version.wayland_micro_version])
 

commit 0929033a85a4ef37601d399293b47f2b907dcb0d
Author: David Herrmann <dh.herrmann@googlemail.com>
Date:   Wed Jan 23 14:20:41 2013 +0100

    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>

diff --git a/.gitignore b/.gitignore
index 4f7a934..99b7089 100644
--- a/.gitignore
+++ b/.gitignore
@@ -29,5 +29,6 @@ ctags
 /ltmain.sh
 /missing
 /stamp-h1
+/test-driver
 Makefile
 Makefile.in
diff --git a/tests/.gitignore b/tests/.gitignore
index e97e294..ccd440a 100644
--- a/tests/.gitignore
+++ b/tests/.gitignore
@@ -1,6 +1,10 @@
+*.log
+*.trs
+
 array-test
 client-test
 connection-test
+display-test
 event-loop-test
 exec-fd-leak-checker
 fixed-benchmark
@@ -8,5 +12,6 @@ fixed-test
 list-test
 map-test
 os-wrappers-test
+queue-test
 sanity-test
-
+socket-test

commit 8a17f121cde0882a1de709ef3f54202bd8de6455
Author: David Herrmann <dh.herrmann@googlemail.com>
Date:   Wed Jan 23 14:11:19 2013 +0100

    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>

diff --git a/src/event-loop.c b/src/event-loop.c
index 25e8f9c..e556cc7 100644
--- a/src/event-loop.c
+++ b/src/event-loop.c
@@ -447,6 +447,6 @@ WL_EXPORT struct wl_listener *
 wl_event_loop_get_destroy_listener(struct wl_event_loop *loop,
 				   wl_notify_func_t notify)
 {
-	wl_signal_get(&loop->destroy_signal, notify);
+	return wl_signal_get(&loop->destroy_signal, notify);
 }
 

commit 8cddb70d21a8b93b479fdbe63529e7a9837dfe73
Author: Jason Ekstrand <jason@jlekstrand.net>
Date:   Fri Jan 11 21:01:47 2013 -0600

    Add a destroy signal to the wl_event_loop object

diff --git a/src/event-loop.c b/src/event-loop.c
index 8db9c7c..25e8f9c 100644
--- a/src/event-loop.c
+++ b/src/event-loop.c
@@ -43,6 +43,8 @@ struct wl_event_loop {
 	struct wl_list check_list;
 	struct wl_list idle_list;
 	struct wl_list destroy_list;
+
+	struct wl_signal destroy_signal;
 };
 
 struct wl_event_source_interface {
@@ -357,12 +359,16 @@ wl_event_loop_create(void)
 	wl_list_init(&loop->idle_list);
 	wl_list_init(&loop->destroy_list);
 
+	wl_signal_init(&loop->destroy_signal);
+
 	return loop;
 }
 
 WL_EXPORT void
 wl_event_loop_destroy(struct wl_event_loop *loop)
 {
+	wl_signal_emit(&loop->destroy_signal, loop);
+
 	wl_event_loop_process_destroy_list(loop);
 	close(loop->epoll_fd);
 	free(loop);
@@ -429,3 +435,18 @@ wl_event_loop_get_fd(struct wl_event_loop *loop)
 {
 	return loop->epoll_fd;
 }
+
+WL_EXPORT void
+wl_event_loop_add_destroy_listener(struct wl_event_loop *loop,
+				   struct wl_listener *listener)
+{
+	wl_signal_add(&loop->destroy_signal, listener);
+}
+
+WL_EXPORT struct wl_listener *
+wl_event_loop_get_destroy_listener(struct wl_event_loop *loop,
+				   wl_notify_func_t notify)
+{
+	wl_signal_get(&loop->destroy_signal, notify);
+}
+
diff --git a/src/wayland-server.h b/src/wayland-server.h
index 576304f..c7369eb 100644
--- a/src/wayland-server.h
+++ b/src/wayland-server.h
@@ -84,6 +84,12 @@ struct wl_touch;
 struct wl_listener;
 typedef void (*wl_notify_func_t)(struct wl_listener *listener, void *data);
 
+void wl_event_loop_add_destroy_listener(struct wl_event_loop *loop,
+					struct wl_listener * listener);
+struct wl_listener *wl_event_loop_get_destroy_listener(
+					struct wl_event_loop *loop,
+					wl_notify_func_t notify);
+
 struct wl_display *wl_display_create(void);
 void wl_display_destroy(struct wl_display *display);
 struct wl_event_loop *wl_display_get_event_loop(struct wl_display *display);
diff --git a/tests/event-loop-test.c b/tests/event-loop-test.c
index 2f3dcd4..c46d3b0 100644
--- a/tests/event-loop-test.c
+++ b/tests/event-loop-test.c
@@ -1,5 +1,6 @@
 /*
  * Copyright © 2012 Intel Corporation
+ * Copyright © 2012 Jason Ekstrand
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -25,6 +26,7 @@
 #include <unistd.h>
 #include <signal.h>
 #include "wayland-server.h"
+#include "wayland-private.h"
 #include "test-runner.h"
 
 static int
@@ -190,3 +192,58 @@ TEST(event_loop_timer)
 	wl_event_source_remove(source);
 	wl_event_loop_destroy(loop);
 }
+
+struct event_loop_destroy_listener {
+	struct wl_listener listener;
+	int done;
+};
+
+static void
+event_loop_destroy_notify(struct wl_listener *l, void *data)
+{
+	struct event_loop_destroy_listener *listener =
+		container_of(l, struct event_loop_destroy_listener, listener);
+
+	listener->done = 1;
+}
+
+TEST(event_loop_destroy)
+{
+	struct wl_event_loop *loop;
+	struct wl_display * display;
+	struct event_loop_destroy_listener a, b;
+
+	loop = wl_event_loop_create();
+	assert(loop);
+
+	a.listener.notify = &event_loop_destroy_notify;
+	a.done = 0;
+	wl_event_loop_add_destroy_listener(loop, &a.listener);
+
+	assert(wl_event_loop_get_destroy_listener(loop,
+	       event_loop_destroy_notify) == &a.listener);
+
+	b.listener.notify = &event_loop_destroy_notify;
+	b.done = 0;
+	wl_event_loop_add_destroy_listener(loop, &b.listener);
+
+	wl_list_remove(&a.listener.link);
+	wl_event_loop_destroy(loop);
+
+	assert(!a.done);
+	assert(b.done);
+
+	/* Test to make sure it gets fired on display destruction */
+	display = wl_display_create();
+	assert(display);
+	loop = wl_display_get_event_loop(display);
+	assert(loop);
+
+	a.done = 0;
+	wl_event_loop_add_destroy_listener(loop, &a.listener);
+
+	wl_display_destroy(display);
+
+	assert(a.done);
+}
+

commit 945771c3d52dff751b48fde3c5c053013dc50747
Author: Quentin Glidic <sardemff7+git@sardemff7.net>
Date:   Sun Jan 6 15:46:00 2013 +0100

    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

diff --git a/tests/event-loop-test.c b/tests/event-loop-test.c
index e630cde..2f3dcd4 100644
--- a/tests/event-loop-test.c
+++ b/tests/event-loop-test.c
@@ -43,14 +43,19 @@ TEST(event_loop_post_dispatch_check)
 	struct wl_event_loop *loop = wl_event_loop_create();
 	struct wl_event_source *source;
 	int dispatch_ran = 0;
+	int p[2];
 
-	source = wl_event_loop_add_fd(loop, 1, WL_EVENT_READABLE,
+	assert(pipe(p) == 0);
+
+	source = wl_event_loop_add_fd(loop, p[0], WL_EVENT_READABLE,
 				      fd_dispatch, &dispatch_ran);
 	wl_event_source_check(source);
 
 	wl_event_loop_dispatch(loop, 0);
 	assert(dispatch_ran);
 
+	assert(close(p[0]) == 0);
+	assert(close(p[1]) == 0);
 	wl_event_source_remove(source);
 	wl_event_loop_destroy(loop);
 }

commit 30ccd3366eda63154a7b39569d85378c82dbef20
Author: Jason Ekstrand <jason@jlekstrand.net>
Date:   Fri Jan 11 14:29:32 2013 -0600

    Added a destroy signal to the wl_display object.
    
    Added a destroy signal to the wl_display object.

diff --git a/src/wayland-server.c b/src/wayland-server.c
index f7f4c14..dae7177 100644
--- a/src/wayland-server.c
+++ b/src/wayland-server.c
@@ -90,6 +90,8 @@ struct wl_display {
 	struct wl_list global_list;
 	struct wl_list socket_list;
 	struct wl_list client_list;
+
+	struct wl_signal destroy_signal;
 };
 
 struct wl_global {
@@ -1096,6 +1098,8 @@ wl_display_create(void)
 	wl_list_init(&display->client_list);
 	wl_list_init(&display->registry_resource_list);
 
+	wl_signal_init(&display->destroy_signal);
+
 	display->id = 1;
 	display->serial = 0;
 
@@ -1115,6 +1119,8 @@ wl_display_destroy(struct wl_display *display)
 	struct wl_socket *s, *next;
 	struct wl_global *global, *gnext;
 
+	wl_signal_emit(&display->destroy_signal, display);
+
 	wl_list_for_each_safe(s, next, &display->socket_list, link) {
 		wl_event_source_remove(s->source);
 		unlink(s->addr.sun_path);
@@ -1381,6 +1387,20 @@ wl_display_add_socket(struct wl_display *display, const char *name)
 	return 0;
 }
 
+WL_EXPORT void
+wl_display_add_destroy_listener(struct wl_display *display,
+				struct wl_listener *listener)
+{
+	wl_signal_add(&display->destroy_signal, listener);
+}
+
+WL_EXPORT struct wl_listener *
+wl_display_get_destroy_listener(struct wl_display *display,
+				wl_notify_func_t notify)
+{
+	return wl_signal_get(&display->destroy_signal, notify);
+}
+
 WL_EXPORT struct wl_resource *
 wl_client_add_object(struct wl_client *client,
 		     const struct wl_interface *interface,
diff --git a/src/wayland-server.h b/src/wayland-server.h
index 3357105..576304f 100644
--- a/src/wayland-server.h
+++ b/src/wayland-server.h
@@ -106,6 +106,11 @@ void wl_display_remove_global(struct wl_display *display,
 uint32_t wl_display_get_serial(struct wl_display *display);
 uint32_t wl_display_next_serial(struct wl_display *display);
 
+void wl_display_add_destroy_listener(struct wl_display *display,
+				     struct wl_listener *listener);
+struct wl_listener *wl_display_get_destroy_listener(struct wl_display *display,
+						    wl_notify_func_t notify);
+
 struct wl_client *wl_client_create(struct wl_display *display, int fd);
 void wl_client_destroy(struct wl_client *client);
 void wl_client_flush(struct wl_client *client);
diff --git a/tests/Makefile.am b/tests/Makefile.am
index cf821c0..54157bc 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,6 +1,7 @@
 TESTS =						\
 	array-test				\
 	client-test				\
+	display-test				\
 	connection-test				\
 	event-loop-test				\
 	fixed-test				\
@@ -22,6 +23,7 @@ test_runner_src = test-runner.c test-runner.h test-helpers.c
 
 array_test_SOURCES = array-test.c $(test_runner_src)
 client_test_SOURCES = client-test.c $(test_runner_src)
+display_test_SOURCES = display-test.c $(test_runner_src)
 connection_test_SOURCES = connection-test.c $(test_runner_src)
 event_loop_test_SOURCES = event-loop-test.c $(test_runner_src)
 fixed_test_SOURCES = fixed-test.c $(test_runner_src)
diff --git a/tests/display-test.c b/tests/display-test.c
new file mode 100644
index 0000000..95b939e
--- /dev/null
+++ b/tests/display-test.c
@@ -0,0 +1,79 @@
+/*
+ * Copyright © 2012 Intel Corporation
+ * Copyright © 2013 Jason Ekstrand
+ *
+ * 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 <stdio.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <assert.h>
+#include <sys/socket.h>
+#include <unistd.h>
+#include <errno.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#include "wayland-server.h"
+#include "wayland-private.h"
+#include "test-runner.h"
+
+struct display_destroy_listener {
+	struct wl_listener listener;
+	int done;
+};
+
+static void
+display_destroy_notify(struct wl_listener *l, void *data)
+{
+	struct display_destroy_listener *listener;
+
+	listener = container_of(l, struct display_destroy_listener, listener);
+	listener->done = 1;
+}
+
+TEST(display_destroy_listener)
+{
+	struct wl_display *display;
+	struct display_destroy_listener a, b;
+
+	display = wl_display_create();
+	assert(display);
+
+	a.listener.notify = &display_destroy_notify;
+	a.done = 0;
+	wl_display_add_destroy_listener(display, &a.listener);
+
+	assert(wl_display_get_destroy_listener(display, display_destroy_notify) ==
+	       &a.listener);
+
+	b.listener.notify = display_destroy_notify;
+	b.done = 0;
+	wl_display_add_destroy_listener(display, &b.listener);
+
+	wl_list_remove(&a.listener.link);
+
+	wl_display_destroy(display);
+
+	assert(!a.done);
+	assert(b.done);
+}
+

commit ce1f41251a07600ed8c6b2e3dc1e868008aeb33a
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Fri Dec 14 16:38:09 2012 -0500

    configure.ac: Bump version to 1.0.3

diff --git a/configure.ac b/configure.ac
index c584439..571ca97 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], [0])
-m4_define([wayland_micro_version], [2])
+m4_define([wayland_micro_version], [3])
 m4_define([wayland_version],
           [wayland_major_version.wayland_minor_version.wayland_micro_version])
 

commit 8148896d19d0e5bb195c76825a4b140d5b16e501
Author: Pekka Paalanen <ppaalanen@gmail.com>
Date:   Wed Dec 12 14:19:23 2012 +0200

    client: remove two unused function pointer typedefs
    
    The need for wl_display_update_func_t was removed in
    
    commit 53d24713a31d59d9534c1c1a84a7ad46f44ee95f
    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>

diff --git a/src/wayland-client.h b/src/wayland-client.h
index 8d2b8df..8b1fd0d 100644
--- a/src/wayland-client.h
+++ b/src/wayland-client.h
@@ -135,9 +135,6 @@ void wl_proxy_set_queue(struct wl_proxy *proxy, struct wl_event_queue *queue);
 
 #include "wayland-client-protocol.h"
 
-typedef int (*wl_display_update_func_t)(uint32_t mask, void *data);
-typedef void (*wl_callback_func_t)(void *data, uint32_t time);
-
 struct wl_display *wl_display_connect(const char *name);
 struct wl_display *wl_display_connect_to_fd(int fd);
 void wl_display_disconnect(struct wl_display *display);

commit 8bcfa5ad7061231495a65d39c4c9503a64fb2746
Author: Pekka Paalanen <ppaalanen@gmail.com>
Date:   Mon Dec 3 16:58:25 2012 +0200

    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>

diff --git a/tests/connection-test.c b/tests/connection-test.c
index 45744a0..1ac88d2 100644
--- a/tests/connection-test.c
+++ b/tests/connection-test.c
@@ -425,7 +425,7 @@ marshal_demarshal(struct marshal_data *data,
 TEST(connection_marshal_demarshal)
 {
 	struct marshal_data data;
-	char f[] = "/tmp/weston-tests-XXXXXX";
+	char f[] = "/tmp/wayland-tests-XXXXXX";
 
 	setup_marshal_data(&data);
 
@@ -478,7 +478,7 @@ TEST(connection_marshal_alot)
 	 * for both regular data an fds. */
 
 	for (i = 0; i < 2000; i++) {
-		strcpy(f, "/tmp/weston-tests-XXXXXX");
+		strcpy(f, "/tmp/wayland-tests-XXXXXX");
 		data.value.h = mkstemp(f);
 		assert(data.value.h >= 0);
 		unlink(f);

commit 15625a5cc70f58aa466f3db5171a5fa1851aad71
Author: Sven Joachim <svenjoac@gmx.de>
Date:   Sun Dec 2 22:42:11 2012 +0100

    tests: Don't leave temporary files behind
    
    Signed-off-by: Sven Joachim <svenjoac@gmx.de>

diff --git a/tests/connection-test.c b/tests/connection-test.c
index d0113f1..45744a0 100644
--- a/tests/connection-test.c
+++ b/tests/connection-test.c
@@ -447,6 +447,7 @@ TEST(connection_marshal_demarshal)
 
 	data.value.h = mkstemp(f);
 	assert(data.value.h >= 0);
+	unlink(f);
 	marshal_demarshal(&data, (void *) validate_demarshal_h,
 			  8, "h", data.value.h);
 
@@ -480,6 +481,7 @@ TEST(connection_marshal_alot)
 		strcpy(f, "/tmp/weston-tests-XXXXXX");
 		data.value.h = mkstemp(f);
 		assert(data.value.h >= 0);
+		unlink(f);
 		marshal_demarshal(&data, (void *) validate_demarshal_h,
 				  8, "h", data.value.h);
 	}

commit 7fd3ca049b2339363d31abcb7fe0e8305972317b
Author: Jonas Ådahl <jadahl@gmail.com>
Date:   Sat Dec 1 17:33:23 2012 +0100

    man, configure.ac: Only generate man pages if we can do it offline
    
    Instead of relying on downloading the stylesheet from the Internet for
    generating man pages, only generate them if the stylesheet is available
    locally.
    
    Signed-off-by: Jonas Ådahl <jadahl@gmail.com>

diff --git a/configure.ac b/configure.ac
index 0d842e1..c584439 100644
--- a/configure.ac
+++ b/configure.ac
@@ -76,6 +76,20 @@ fi
 AC_PATH_PROG(XSLTPROC, xsltproc)
 AM_CONDITIONAL([HAVE_XSLTPROC], [test "x$XSLTPROC" != "x"])
 
+AC_MSG_CHECKING([for docbook manpages stylesheet])
+MANPAGES_STYLESHEET=http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
+AC_PATH_PROGS_FEATURE_CHECK([XSLTPROC_TMP], [xsltproc],
+			    AS_IF([`"$ac_path_XSLTPROC_TMP" --nonet "$MANPAGES_STYLESHEET" > /dev/null 2>&1`],
+				  [HAVE_MANPAGES_STYLESHEET=yes]))
+if test "x$HAVE_MANPAGES_STYLESHEET" = "xyes"; then
+	AM_CONDITIONAL([HAVE_MANPAGES_STYLESHEET], true)
+	AC_SUBST(MANPAGES_STYLESHEET)
+	AC_MSG_RESULT([yes])
+else
+	AM_CONDITIONAL([HAVE_MANPAGES_STYLESHEET], false)
+	AC_MSG_RESULT([no])
+fi
+
 AM_CONDITIONAL(BUILD_DOCS, [test x$enable_documentation = xyes])
 if test "x$enable_documentation" = "xyes"; then
 	AC_PATH_PROG(DOXYGEN, doxygen)
diff --git a/doc/man/Makefile.am b/doc/man/Makefile.am
index a6a5072..1407953 100644
--- a/doc/man/Makefile.am
+++ b/doc/man/Makefile.am
@@ -16,6 +16,7 @@ EXTRA_DIST =
 man_MANS =
 
 if HAVE_XSLTPROC
+if HAVE_MANPAGES_STYLESHEET
 
 CLEANFILES += $(MANPAGES) $(MANPAGES_ALIASES)
 EXTRA_DIST += $(MANPAGES) $(MANPAGES_ALIASES) $(XML_FILES)
@@ -25,11 +26,12 @@ XSLTPROC_FLAGS = \
 	--stringparam man.authors.section.enabled 0 \
 	--stringparam man.copyright.section.enabled 0 \
 	--stringparam funcsynopsis.style ansi \
-	--stringparam man.output.quietly 1
+	--stringparam man.output.quietly 1 \
+	--nonet
 
 XSLTPROC_PROCESS_MAN = \
 	$(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
-	$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< && \
+	$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(MANPAGES_STYLESHEET) $< && \
 	$(SED) -i -e 's/^\.so \(.*\)\.\(.\)$$/\.so man\2\/\1\.\2/' $(MANPAGES_ALIASES)
 
 %.1: %.xml
@@ -46,4 +48,5 @@ XSLTPROC_PROCESS_MAN = \
 
 wl_display_connect_to_fd.3: wl_display_connect.3
 
+endif # HAVE_MANPAGES_STYLESHEET
 endif # HAVE_XSLTPROC

commit 61387cac3de4dbe574263a0fc4c1fce1ecd3629d
Author: Jonas Ådahl <jadahl@gmail.com>
Date:   Sat Dec 1 17:33:22 2012 +0100

    doc: Only generate Wayland documentation if xsltproc was found
    
    Instead of failing to generate documentation because xsltproc doesn't
    exist, don't try to generate at all.
    
    Signed-off-by: Jonas Ådahl <jadahl@gmail.com>

diff --git a/doc/Wayland/Makefile.am b/doc/Wayland/Makefile.am
index 53ad6ee..1d27b1a 100644
--- a/doc/Wayland/Makefile.am
+++ b/doc/Wayland/Makefile.am
@@ -14,6 +14,7 @@ publican_sources = \
 	$(srcdir)/en_US/images/x-architecture.png
 
 if HAVE_PUBLICAN
+if HAVE_XSLTPROC
 noinst_DATA = Wayland $(publican_targets)
 pubdir = $(docdir)/Wayland/en-US
 
@@ -96,5 +97,6 @@ uninstall-local:
 	fi;
 
 endif
+endif
 
 EXTRA_DIST = $(publican_sources) publican.cfg protocol-to-docbook.xsl protocol-interfaces-to-docbook.xsl doxygen-to-publican.xsl

commit 64e37842983349dcb3bfd102885669db0c01b16c
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Fri Nov 30 16:00:00 2012 -0500

    configure.ac: Bump version to 1.0.2

diff --git a/configure.ac b/configure.ac
index aa7a62a..0d842e1 100644
--- a/configure.ac


Reply to: