aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/system
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 /internal/system
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 'internal/system')
-rw-r--r--internal/system/wayland.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/system/wayland.go b/internal/system/wayland.go
index 7c233472..9646b467 100644
--- a/internal/system/wayland.go
+++ b/internal/system/wayland.go
@@ -38,6 +38,10 @@ func (w Wayland) apply(sys *I) error {
}
if err := w.conn.Attach(w.pair[1]); err != nil {
+ // make console output less nasty
+ if errors.Is(err, os.ErrNotExist) {
+ err = os.ErrNotExist
+ }
return fmsg.WrapErrorSuffix(err,
fmt.Sprintf("cannot attach to wayland on %q:", w.pair[1]))
} else {