refactor: move the socket probe to its own file behind a feature

Addresses the maintainer's two requests on #580: linux.rs was crowded,
and the new fallback should not touch the base Wayland path.

All the socket-probe machinery moves to src/platform/linux/wayland_probe.rs
- the child entry point, the runtime-dir scan, the privilege drop, the
process-group probe and its buffered-line inspection - leaving
WaylandDisplayInfo and get_wayland_displays in linux.rs. The module and
the fallback call in get_wayland_displays are gated on a new off-by-default
feature 'wayland_probe'; without it get_wayland_displays returns the
connect error exactly as it did before this fallback existed, so a
consumer that does not build the DRM login-screen backend compiles none
of this. The DRM build turns the feature on through scrap/drm.
This commit is contained in:
Mariano Abad
2026-08-12 01:48:27 -03:00
parent f69648753a
commit 6e27672774
3 changed files with 361 additions and 349 deletions
+3
View File
@@ -9,6 +9,9 @@ edition = "2018"
[features]
default = []
webrtc = ["dep:webrtc"]
# The isolated Wayland socket-probe fallback (src/platform/linux/wayland_probe.rs). Off by default
# so the base Wayland enumeration is untouched; the DRM login-screen build (scrap/drm) turns it on.
wayland_probe = []
[dependencies]
# new flexi_logger failed on rustc 1.75