From: Pekka Paalanen <[email protected]>

Clarify the error message to explicitly say one was trying to connect to
a parent Wayland compositor. This hopefully is a good enough hint on
what using the wayland-backend is trying to do.

Add the command line display option value and WAYLAND_DISPLAY values for
good measure. WAYLAND_SOCKET is not shown as libwayland-client removes
it.

Signed-off-by: Pekka Paalanen <[email protected]>
---
 libweston/compositor-wayland.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libweston/compositor-wayland.c b/libweston/compositor-wayland.c
index d27b863f..bc78cbdb 100644
--- a/libweston/compositor-wayland.c
+++ b/libweston/compositor-wayland.c
@@ -2541,7 +2541,10 @@ wayland_backend_create(struct weston_compositor 
*compositor,
 
        b->parent.wl_display = wl_display_connect(new_config->display_name);
        if (b->parent.wl_display == NULL) {
-               weston_log("failed to create display: %m\n");
+               weston_log("Error: Failed to connect to parent Wayland 
compositor: %m\n");
+               weston_log_continue(STAMP_SPACE "display option: %s, 
WAYLAND_DISPLAY=%s\n",
+                                   new_config->display_name ?: "(none)",
+                                   getenv("WAYLAND_DISPLAY") ?: "(not set)");
                goto err_compositor;
        }
 
-- 
2.13.6

_______________________________________________
wayland-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to