Add a new CLI flag
This commit is contained in:
parent
6ab849400d
commit
d2e35569ec
1 changed files with 6 additions and 2 deletions
|
@ -214,6 +214,10 @@ const FORCE_ENABLE_CRASH_REPORTS = process.argv.some(
|
||||||
arg => arg === '--enable-crash-reports'
|
arg => arg === '--enable-crash-reports'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const DISABLE_SCREEN_SECURITY = process.argv.some(
|
||||||
|
arg => arg === '--disable-screen-security'
|
||||||
|
);
|
||||||
|
|
||||||
const CLI_LANG = cliOptions.lang as string | undefined;
|
const CLI_LANG = cliOptions.lang as string | undefined;
|
||||||
|
|
||||||
setupCrashReports(getLogger, showDebugLogWindow, FORCE_ENABLE_CRASH_REPORTS);
|
setupCrashReports(getLogger, showDebugLogWindow, FORCE_ENABLE_CRASH_REPORTS);
|
||||||
|
@ -576,8 +580,8 @@ async function handleCommonWindowEvents(window: BrowserWindow) {
|
||||||
// Apply content protection by default on Windows, unless explicitly disabled
|
// Apply content protection by default on Windows, unless explicitly disabled
|
||||||
// by user in settings.
|
// by user in settings.
|
||||||
if (
|
if (
|
||||||
contentProtection ??
|
!DISABLE_SCREEN_SECURITY &&
|
||||||
isContentProtectionEnabledByDefault(OS, os.release())
|
(contentProtection ?? isContentProtectionEnabledByDefault(OS, os.release()))
|
||||||
) {
|
) {
|
||||||
window.once('ready-to-show', async () => {
|
window.once('ready-to-show', async () => {
|
||||||
window.setContentProtection(true);
|
window.setContentProtection(true);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue