Skip to content

Commit

Permalink
no-sandbox
Browse files Browse the repository at this point in the history
  • Loading branch information
lacymorrow committed Jun 3, 2023
1 parent fd298ac commit 4820565
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"install": "yarn css",
"postinstall": "electron-builder install-app-deps",
"css": "sass src/renderer/styles/index.scss:src/renderer/styles/dist/index.css src/renderer/styles/preferences.scss:src/renderer/styles/dist/preferences.css -s compressed",
"start": "yarn css && electron --trace-warnings .",
"start": "yarn css && electron --no-sandbox --trace-warnings .",
"watch": "nodemon -e js,ts,scss --ignore 'dist/' --watch . --exec 'npm run start'",
"lint": "eslint --fix .",
"lint:src": "eslint --fix src",
Expand Down
16 changes: 16 additions & 0 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ const start = async () => {
// Const contextMenu = require('electron-context-menu')
// contextMenu()

/* LINUX FIXES */

// Fix for Linux transparency issues
if ( is.linux || !checkboxTrue( preferences.value( 'app.gpu' ), 'gpu' ) ) {

Expand All @@ -126,6 +128,20 @@ const start = async () => {

}

if ( is.linux || !checkboxTrue( preferences.value( 'app.gpu' ), 'gpu' ) ) {

// Disable hardware acceleration
log.info( 'Setting: Disable GPU' )
app.commandLine.appendSwitch( 'enable-transparent-visuals' )
app.commandLine.appendSwitch( 'disable-gpu' )
app.disableHardwareAcceleration()

} else {

log.info( 'Setting: Enable GPU' )

}

}

const ready = async () => {
Expand Down

0 comments on commit 4820565

Please sign in to comment.