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.
This commit is contained in:
Window Maker 2026-05-24 15:34:09 +02:00
parent bc431e5727
commit 9a9cc9e9df
1 changed files with 3 additions and 1 deletions

View File

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