summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2013-04-16 11:21:48 -0400
committerKristian Høgsberg <krh@bitplanet.net>2013-04-16 20:46:59 -0400
commit2e437207435a1b8720b5c623ccfc773e171ccf68 (patch)
treef18f5395abed20e816bd2d5f7d5f2dc2bb7b0e2b
parentc08bc364fc2334806f06f79d9dd3023c772940bb (diff)
window: Add a log handler for window.c clients
This way we can see what kind of error we get if we get an error.
-rw-r--r--clients/window.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/clients/window.c b/clients/window.c
index 073ce53..2540cc9 100644
--- a/clients/window.c
+++ b/clients/window.c
@@ -4383,11 +4383,19 @@ handle_display_data(struct task *task, uint32_t events)
}
}
+static void
+log_handler(const char *format, va_list args)
+{
+ vfprintf(stderr, format, args);
+}
+
struct display *
display_create(int *argc, char *argv[])
{
struct display *d;
+ wl_log_set_handler_client(log_handler);
+
d = malloc(sizeof *d);
if (d == NULL)
return NULL;