From e0a46f6b2b4bb5b5b77c22f1d2b12cbc3b7bf89c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20T=C3=BCrkoglu?= Date: Tue, 17 Sep 2024 08:05:21 +1000 Subject: Add Option to Enable/Disable Screen Capture (#1418) Veracrypt currently appears in screenshots and screen captures, which can unintentionally expose sensitive information, such as the fact that Veracrypt is running or the location of your volumes. Both Windows and macOS offer mechanisms to exclude specific windows from being captured. While not foolproof, this is a useful preventative measure. The method is a no-op for Linux/FreeBSD. For more details on the wxWidgets API, see: https://docs.wxwidgets.org/3.2/classwx_top_level_window.html#a337b9cec62b0cbd3b1b1545a83270f64 --- src/Main/Forms/MainFrame.cpp | 7 +++++++ src/Main/Forms/MainFrame.h | 1 + 2 files changed, 8 insertions(+) (limited to 'src/Main/Forms') diff --git a/src/Main/Forms/MainFrame.cpp b/src/Main/Forms/MainFrame.cpp index 6355f139..77f371d8 100644 --- a/src/Main/Forms/MainFrame.cpp +++ b/src/Main/Forms/MainFrame.cpp @@ -84,6 +84,7 @@ namespace VeraCrypt InitTaskBarIcon(); InitEvents(); InitMessageFilter(); + InitWindowPrivacy(); if (!GetPreferences().SecurityTokenModule.IsEmpty() && !SecurityToken::IsInitialized()) { @@ -470,6 +471,12 @@ namespace VeraCrypt #endif } + + void MainFrame::InitWindowPrivacy () + { + Gui->SetContentProtection(!CmdLine->ArgAllowScreencapture); + } + void MainFrame::InitPreferences () { try diff --git a/src/Main/Forms/MainFrame.h b/src/Main/Forms/MainFrame.h index ab70eae3..ed1c44f7 100644 --- a/src/Main/Forms/MainFrame.h +++ b/src/Main/Forms/MainFrame.h @@ -84,6 +84,7 @@ namespace VeraCrypt void InitMessageFilter (); void InitPreferences (); void InitTaskBarIcon (); + void InitWindowPrivacy(); bool IsFreeSlotSelected () const { return SlotListCtrl->GetSelectedItemCount() == 1 && Gui->GetListCtrlSubItemText (SlotListCtrl, SelectedItemIndex, ColumnPath).empty(); } bool IsMountedSlotSelected () const { return SlotListCtrl->GetSelectedItemCount() == 1 && !Gui->GetListCtrlSubItemText (SlotListCtrl, SelectedItemIndex, ColumnPath).empty(); } void LoadFavoriteVolumes (); -- cgit v1.2.3