mirror of
https://github.com/rustdesk/hbb_common.git
synced 2026-08-27 04:37:35 +00:00
f436f53f0d3a71431596bd620fbd20b349ab8711
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.
Description
No description provided
Languages
Rust
100%