Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

Disable screenshot protection setting if the platform is linux #349

Conversation

krau612
Copy link

@krau612 krau612 commented Oct 16, 2017

Because Electron doesn't have content protection on Linux, I think the screenshot protection settings button should be disabled on Linux. Users shouldn't be given an option that they may think provides some security if the option actually does nothing, it's misleading.

Resolves #336

main.js Outdated
@@ -177,6 +177,10 @@ function createWindow () {
}
];

if (process.platform === "linux") {
template[0].submenu[2] = { label: "Screenshot Protection Not Available On Linux", enabled: false};
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is the best way to go about it -- specifically i'm talking about referencing template element 0 & submenu element 2. If a submenu gets added before the screenshot label then this will cause unintended effects.

Would be preferred to call a method from line 153 that gets the appropriate screenshot label

@krau612
Copy link
Author

krau612 commented Oct 17, 2017

Good call, thank you @spresnal . I created a function to get the proper label.

One issue though is that template[0].submenu[2] is still used in updateScreenshotProtectionItem().

@luciorubeens luciorubeens merged commit ce007ae into ArkEcosystem:master Oct 25, 2017
@luciorubeens
Copy link
Contributor

+5 👍🏻

alexbarnsley pushed a commit that referenced this pull request Dec 3, 2018
* feat: blur modal backdrop

* fix: portal -> modal
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants