mirror of
https://github.com/kunkundi/crossdesk.git
synced 2026-10-15 00:09:39 +08:00
[fix] preserve Windows privacy startup and server window
This commit is contained in:
@@ -2819,10 +2819,11 @@ void GuiApplication::SyncServerWindow() {
|
||||
});
|
||||
}
|
||||
|
||||
// macOS covers the local panel with capture-excluded privacy windows. Keep
|
||||
// the panel alive so remote controllers can still see and operate it.
|
||||
// Windows and macOS cover the local panel with capture-excluded privacy
|
||||
// windows. Keep the panel alive throughout privacy transitions so remote
|
||||
// controllers can still see and operate it without resetting its UI state.
|
||||
bool show_controller_window = has_connected_controller;
|
||||
#if !defined(__APPLE__)
|
||||
#if !defined(_WIN32) && !defined(__APPLE__)
|
||||
// Preserve the existing panel behavior on other platforms.
|
||||
const auto privacy_status = privacy_.Snapshot();
|
||||
const bool privacy_covering = privacy_status.overlay_active ||
|
||||
|
||||
@@ -105,8 +105,14 @@ void PrivacyController::Fail(const std::string& reason) {
|
||||
}
|
||||
void PrivacyController::CaptureChanged(bool running) {
|
||||
std::lock_guard lock(mutex_);
|
||||
// Windows announces a stopped capture while preparing the first session.
|
||||
// Keep automatic privacy pending until capture starts, within its deadline.
|
||||
// Once capture was running or backend enable began, a stop remains a fault.
|
||||
const bool waiting_for_initial_capture =
|
||||
automatic_enable_ && enable_pending_ && !capture_running_;
|
||||
capture_running_ = running;
|
||||
if (!running) FailLocked("Capture changed; privacy screen is being turned off");
|
||||
if (!running && !waiting_for_initial_capture)
|
||||
FailLocked("Capture changed; privacy screen is being turned off");
|
||||
WakeLocked();
|
||||
}
|
||||
void PrivacyController::Run(Factory factory) {
|
||||
|
||||
Reference in New Issue
Block a user