Skip to content

Commit

Permalink
Fixing window content protection #156
Browse files Browse the repository at this point in the history
  • Loading branch information
Levminer committed Nov 19, 2021
1 parent c40430a commit b4005b8
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -844,9 +844,14 @@ ipc.on("disableWindowCapture", () => {
} catch (error) {}

window_application.setContentProtection(true)
window_settings.setContentProtection(true)
window_import.setContentProtection(true)
window_export.setContentProtection(true)
window_application.setContentProtection(false)
window_edit.setContentProtection(true)

if (authenticated === false) {
window_settings.webContents.executeJavaScript("toggleWindowCaptureSwitch()")
}

logger.log("Screen capture disabled")
})
Expand All @@ -856,10 +861,19 @@ ipc.on("disableWindowCapture", () => {
*/
ipc.on("enableWindowCapture", () => {
try {
window_landing.setContentProtection(false)
window_confirm.setContentProtection(false)
} catch (error) {}

window_application.setContentProtection(false)
window_settings.setContentProtection(false)
window_import.setContentProtection(false)
window_export.setContentProtection(false)
window_edit.setContentProtection(false)

if (authenticated === false) {
window_settings.webContents.executeJavaScript("toggleWindowCaptureSwitch()")
}

logger.log("Screen capture enabled")
})
Expand Down

0 comments on commit b4005b8

Please sign in to comment.