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.
This commit is contained in:
Kristian Høgsberg 2013-04-16 11:21:48 -04:00
parent c08bc364fc
commit 2e43720743
1 changed files with 8 additions and 0 deletions

View File

@ -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;