Address review findings on the VNC server, session auth and capture decoder

This commit is contained in:
Viktor Liu
2026-08-27 18:33:52 +02:00
parent 09e069a175
commit 47d8f912e5
18 changed files with 179 additions and 72 deletions
+4 -2
View File
@@ -32,9 +32,11 @@ type X11InputInjector struct {
// NewX11InputInjector connects to the X11 display and initializes XTest.
// Empty cookieHex/authFile fall back to XAUTHORITY env lookup.
func NewX11InputInjector(display, cookieHex, authFile string) (*X11InputInjector, error) {
detectX11Display()
// Only probe for a display when the caller named none: detection writes
// DISPLAY and XAUTHORITY into this process's environment, which has no
// business changing when the caller already knows which display to use.
if display == "" {
detectX11Display()
display = os.Getenv(envDisplay)
}
if display == "" {