aboutsummaryrefslogtreecommitdiffhomepage
path: root/wl
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-02-15 14:45:09 +0900
committerOphestra <cat@gensokyo.uk>2025-02-15 14:45:09 +0900
commit268a90f1a505a00e1eab794e9c1760fdff5592d3 (patch)
tree5354b231bc41d7f3e10a2ffac94a3f7de660f6ea /wl
parent3054527ca579c9063840c0eff1e6160d791254fe (diff)
app: improve WAYLAND_DISPLAY correctness
This now has identical behaviour as wayland C library. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'wl')
-rw-r--r--wl/consts.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/wl/consts.go b/wl/consts.go
new file mode 100644
index 00000000..2ad4028c
--- /dev/null
+++ b/wl/consts.go
@@ -0,0 +1,15 @@
+package wl
+
+const (
+ // WaylandDisplay contains the name of the server socket
+ // (https://gitlab.freedesktop.org/wayland/wayland/-/blob/1.23.1/src/wayland-client.c#L1147)
+ // which is concatenated with XDG_RUNTIME_DIR
+ // (https://gitlab.freedesktop.org/wayland/wayland/-/blob/1.23.1/src/wayland-client.c#L1171)
+ // or used as-is if absolute
+ // (https://gitlab.freedesktop.org/wayland/wayland/-/blob/1.23.1/src/wayland-client.c#L1176).
+ WaylandDisplay = "WAYLAND_DISPLAY"
+
+ // FallbackName is used as the wayland socket name if WAYLAND_DISPLAY is unset
+ // (https://gitlab.freedesktop.org/wayland/wayland/-/blob/1.23.1/src/wayland-client.c#L1149).
+ FallbackName = "wayland-0"
+)