Skip to content

Commit

Permalink
main: do not lower priority of rendering when in background
Browse files Browse the repository at this point in the history
This prevents rendering getting slow when switching to other
applications while installing, which results in the installer
interacting with the device while GUI is trying to catch up
with the installation process.

Change-Id: I201defba33d76322d3405d254b7a4b6ba3530bd1
Signed-off-by: Alexander Martinz <amartinz@shiftphones.com>
  • Loading branch information
amartinz authored and NeoTheThird committed Jun 3, 2022
1 parent 20fdedc commit e60658e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ const reporter = require("./lib/reporter.js");
const menuManager = require("./lib/menuManager.js");
const core = require("./core/core.js");

// Do not lower priority of rendering when in background
// - See: https://www.electronjs.org/de/docs/latest/api/command-line-switches#--disable-renderer-backgrounding
if (typeof app.commandLine !== "undefined") {
app.commandLine.appendSwitch("disable-renderer-backgrounding");
}

// Enable live reload for Electron
if (process.env.ROLLUP_WATCH) {
require("electron-reload")(path.resolve("./public"), {
Expand Down

0 comments on commit e60658e

Please sign in to comment.