aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2020-04-16 19:49:12 +0200
committerSimon Ser <contact@emersion.fr>2020-04-16 19:49:12 +0200
commit24ca1a5b578a63b731127c115f2cc6ea50c25686 (patch)
tree33c9cd44c899954cb272b43cc89ac7b45ac92c93 /src
parentREADME with upadated compile instructions (diff)
downloadwayland-24ca1a5b578a63b731127c115f2cc6ea50c25686.tar
wayland-24ca1a5b578a63b731127c115f2cc6ea50c25686.tar.gz
wayland-24ca1a5b578a63b731127c115f2cc6ea50c25686.tar.bz2
wayland-24ca1a5b578a63b731127c115f2cc6ea50c25686.tar.lz
wayland-24ca1a5b578a63b731127c115f2cc6ea50c25686.tar.xz
wayland-24ca1a5b578a63b731127c115f2cc6ea50c25686.tar.zst
wayland-24ca1a5b578a63b731127c115f2cc6ea50c25686.zip
client: improve wl_display_connect docs
Add a paragraph about WAYLAND_SOCKET and describe what happens when the display name is a relative path. Signed-off-by: Simon Ser <contact@emersion.fr>
Diffstat (limited to 'src')
-rw-r--r--src/wayland-client.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/wayland-client.c b/src/wayland-client.c
index 5358500..21d4606 100644
--- a/src/wayland-client.c
+++ b/src/wayland-client.c
@@ -1113,6 +1113,13 @@ wl_display_connect_to_fd(int fd)
* its value will be replaced with the WAYLAND_DISPLAY environment
* variable if it is set, otherwise display "wayland-0" will be used.
*
+ * If WAYLAND_SOCKET is set, it's interpreted as a file descriptor number
+ * referring to an already opened socket. In this case, the socket is used
+ * as-is and \c name is ignored.
+ *
+ * If \c name is a relative path, then the socket is opened relative to
+ * the XDG_RUNTIME_DIR directory.
+ *
* If \c name is an absolute path, then that path is used as-is for
* the location of the socket at which the Wayland server is listening;
* no qualification inside XDG_RUNTIME_DIR is attempted.