From acf82a36bb20a869f66563b365fa65af429f067e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Tue, 7 Sep 2010 21:40:31 -0400 Subject: [PATCH] Log emitted events as well in debug mode --- connection.c | 4 +++- wayland-server.c | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/connection.c b/connection.c index 53e265a9..d7723927 100644 --- a/connection.c +++ b/connection.c @@ -374,7 +374,6 @@ wl_connection_vmarshal(struct wl_connection *connection, int i, count, fd, extra_size; extra_size = wl_message_size_extra(message); - closure->message = message; count = strlen(message->signature) + 2; extra = (char *) closure->buffer; start = &closure->buffer[DIV_ROUNDUP(extra_size, sizeof *p)]; @@ -467,7 +466,10 @@ wl_connection_vmarshal(struct wl_connection *connection, size = (p - start) * sizeof *p; start[0] = sender->id; start[1] = opcode | (size << 16); + closure->start = start; + closure->message = message; + closure->count = count; return closure; } diff --git a/wayland-server.c b/wayland-server.c index 5c9cc581..a64ceb82 100644 --- a/wayland-server.c +++ b/wayland-server.c @@ -93,6 +93,12 @@ wl_client_post_event(struct wl_client *client, struct wl_object *sender, va_end(ap); wl_closure_send(closure, client->connection); + + if (wl_debug) { + fprintf(stderr, " -> "); + wl_closure_print(closure, sender); + } + wl_closure_destroy(closure); }