Mariano Abad f436f53f0d fix: only fall back when nothing named an endpoint, and validate the directory
Review of the first version, all three correct.

The important one: `connect_to_env()` honours `WAYLAND_DISPLAY` and `WAYLAND_SOCKET`,
and the fallback ignored that choice. If an explicit endpoint was named and failed,
this could attach to a *different* compositor and read output positions from the wrong
display. It now runs only when neither variable is set, which is also the only case it
was ever justified by.

`XDG_RUNTIME_DIR` is read with `var_os` and rejected when relative, since `.` or
`../tmp` would probe against the working directory. And every failed probe is kept
instead of the last one overwriting the first, so an error naming both sockets says
what happened to both.

The comment is three lines now: the reasoning belongs here, in the commit.
2026-08-07 19:29:04 -03:00
2025-11-20 14:58:10 +08:00
2026-07-17 17:44:01 +08:00
2025-01-20 16:06:27 +08:00
2025-01-20 16:06:27 +08:00
2026-01-21 11:09:44 +08:00
S
Description
原始地址 https://github.com/rustdesk/hbb_common 并未做任何修改 只是为了拉取代码方便
701 KiB
0 Stars 1 Watchers 0 Forks
Languages
Rust 100%