[feat] add Linux X11 privacy screen and automatic recovery

This commit is contained in:
dijunkun
2026-09-13 03:49:17 +08:00
parent 3c403f6162
commit c6635fbdc8
12 changed files with 1073 additions and 9 deletions
@@ -57,6 +57,9 @@ std::unique_ptr<PrivacyBackend> CreateMacPrivacyBackend();
// Flush queued AppKit cleanup after joining the controller at app shutdown.
void FlushMacPrivacyTasks();
#endif
#ifdef __linux__
std::unique_ptr<PrivacyBackend> CreateLinuxPrivacyBackend();
#endif
} // namespace crossdesk
@@ -16,6 +16,8 @@ PrivacyController::PrivacyController(Factory factory) {
if (!factory) factory = CreateWindowsPrivacyBackend;
#elif defined(__APPLE__)
if (!factory) factory = CreateMacPrivacyBackend;
#elif defined(__linux__)
if (!factory) factory = CreateLinuxPrivacyBackend;
#endif
thread_ = std::thread([this, factory] { Run(factory); });
}