wayland: Set a wayland-client log handler to print errors we get
This commit is contained in:
@@ -207,6 +207,12 @@ static const struct wl_registry_listener registry_listener = {
|
||||
gdk_registry_handle_global_remove
|
||||
};
|
||||
|
||||
static void
|
||||
log_handler(const char *format, va_list args)
|
||||
{
|
||||
g_logv (G_LOG_DOMAIN, G_LOG_LEVEL_ERROR, format, args);
|
||||
}
|
||||
|
||||
GdkDisplay *
|
||||
_gdk_wayland_display_open (const gchar *display_name)
|
||||
{
|
||||
@@ -214,6 +220,8 @@ _gdk_wayland_display_open (const gchar *display_name)
|
||||
GdkDisplay *display;
|
||||
GdkWaylandDisplay *display_wayland;
|
||||
|
||||
wl_log_set_handler_client(log_handler);
|
||||
|
||||
wl_display = wl_display_connect(display_name);
|
||||
if (!wl_display)
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user