macOS: add screen protection preference

Persist a macOS-only preference for disabling wx content protection while keeping protection enabled by default.

Add a Preferences checkbox that reuses IDC_DISABLE_SCREEN_PROTECTION and reapply the protection state after preference changes.

Apply content-protection updates to all current top-level wx windows so changing the preference while a modal dialog is active does not leave the main frame or other windows with stale protection state.
This commit is contained in:
Mounir IDRASSI
2026-06-21 10:29:31 +02:00
parent adac089fd6
commit e6eb1d9f57
6 changed files with 38 additions and 2 deletions
+6
View File
@@ -84,6 +84,9 @@ namespace VeraCrypt
TC_CONFIG_SET (CloseSecurityTokenSessionsAfterMount);
TC_CONFIG_SET (EMVSupportEnabled);
TC_CONFIG_SET (DisableKernelEncryptionModeWarning);
#ifdef TC_MACOSX
TC_CONFIG_SET (DisableScreenProtection);
#endif
TC_CONFIG_SET (DismountOnInactivity);
TC_CONFIG_SET (DismountOnLogOff);
TC_CONFIG_SET (DismountOnPowerSaving);
@@ -212,6 +215,9 @@ namespace VeraCrypt
TC_CONFIG_ADD (CloseSecurityTokenSessionsAfterMount);
TC_CONFIG_ADD (EMVSupportEnabled);
TC_CONFIG_ADD (DisableKernelEncryptionModeWarning);
#ifdef TC_MACOSX
TC_CONFIG_ADD (DisableScreenProtection);
#endif
TC_CONFIG_ADD (DismountOnInactivity);
TC_CONFIG_ADD (DismountOnLogOff);
TC_CONFIG_ADD (DismountOnPowerSaving);