From 9a9cc9e9df23772917f553190f01dd86097a3344 Mon Sep 17 00:00:00 2001 From: Window Maker Date: Sun, 24 May 2026 15:34:09 +0200 Subject: [PATCH] WINGs/wclient_wl: pass NULL to wl_display_connect for default socket WPrefs passes display_name="" by default. wl_display_connect("") treats the empty string as a literal socket name and fails. Pass NULL instead so it uses $WAYLAND_DISPLAY. Also handle the literal string "wayland" (from detect matching) the same way. --- WINGs/wclient_wl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/WINGs/wclient_wl.c b/WINGs/wclient_wl.c index 18a66be..7aab6d5 100644 --- a/WINGs/wclient_wl.c +++ b/WINGs/wclient_wl.c @@ -941,7 +941,9 @@ W_WLClientInit(struct W_Screen *scrPtr, const char *display) memset(ctx, 0, sizeof(*ctx)); ctx->scr = scrPtr; - ctx->display = wl_display_connect(display); + ctx->display = wl_display_connect( + (display && display[0] && strcmp(display, "wayland") != 0) + ? display : NULL); if (!ctx->display) { wwarning(_("WINGs: wl_display_connect() failed")); goto fail;