mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-11-25 23:30:28 +00:00
* fix(windows): stabilize privacy mode 2 initialization First-time Amyuni setup can reset the display layout after the monitor appears. Prepare it on a worker outside the privacy mutex and connection loop, keeping remote input and video responsive during initialization. Poll DXGI for five seconds without capture loss, with a 20-second deadline. Log and retain the full wait when DXGI cannot be observed. Cancel pending activation on disable, disconnect or permission revocation. Validate active outputs before reporting success and detect subsequent privacy loss in the display loop. Notify the authenticated owner directly without depending on the connection manager. Validation: default test build and two privacy-mode regression tests; Flutter cargo check --tests; formatting and whitespace checks; successful first-install hardware test with 12.1-second activation and manual exit. Signed-off-by: fufesou <linlong1266@gmail.com> * fix(windows): preserve privacy monitor cleanup and allow retries Carry the monitor created during Amyuni preparation into privacy mode's existing cleanup list so exiting removes one monitor instead of all managed virtual monitors. Wait cancellably for ongoing preparation when activation is retried, keeping the connection responsive. Add a regression test for waiting and cancellation. Signed-off-by: fufesou <linlong1266@gmail.com> * fix(windows): skip privacy restoration when cancelling preparation A cancelled preparation worker already owns cleanup. Acknowledge cancellation without restoring an inactive privacy layout, which could otherwise remove all managed virtual monitors before the worker finishes. Signed-off-by: fufesou <linlong1266@gmail.com> * fix(windows): roll back inactive privacy monitor preparation Attempt to undo an accepted Amyuni monitor request when privacy preparation fails or is cancelled, even if active-display enumeration cannot see the requested monitor. Preserve non-forced removal for active outputs and report cleanup failures. Signed-off-by: fufesou <linlong1266@gmail.com> * chore(windows): trim privacy diagnostics and adjust polling Remove temporary activation logs and move the preparation-lock test module after the other Amyuni items. Use a 300 ms polling interval for display stabilization and preparation-lock cancellation checks. Signed-off-by: fufesou <linlong1266@gmail.com> * perf(windows): probe privacy readiness without pixel readback Check DXGI duplication access without copying or mapping desktop pixels during first-install privacy preparation. Reuse frame cleanup and preserve the existing stability window and normal capture path. Log probe creation and recreation timing, and clarify which display flags are excluded from privacy validation. Signed-off-by: fufesou <linlong1266@gmail.com> * fix(windows): probe the prepared display during privacy initialization Observe the newly created Amyuni output so the readiness probe does not contend with video capture for the same DXGI duplication interface. Retry temporary DXGI unavailability within the existing initialization deadline while retaining the stability interval and explicit full-wait fallback. Signed-off-by: fufesou <linlong1266@gmail.com> * fix(windows): report privacy preparation cleanup failures Preserve the single-monitor safety checks when cleaning up a prepared Amyuni display and propagate driver errors directly. Leave ordinary monitor removal and best-effort bulk cleanup unchanged. Signed-off-by: fufesou <linlong1266@gmail.com> * fix(windows): retain privacy initialization wait across retries Remember unfinished first-install observation after monitor creation or stability failures. Recheck it when reusing an existing Amyuni output, and clear it only after the existing observation policy completes. Keep the state local to privacy preparation and serialize access with the existing preparation lock. Signed-off-by: fufesou <linlong1266@gmail.com> * fix(windows): validate privacy preparation and avoid display stalls Keep initialization pending when its output disappears, and wait for an active output count decrease before completing preparation cleanup. Skip privacy checks while activation or restoration holds the mutex, report poisoned locks, and log preparation errors with throttling. Signed-off-by: fufesou <linlong1266@gmail.com> --------- Signed-off-by: fufesou <linlong1266@gmail.com>