Remove flags that disable renderer backgrounding

We added these in the past to work around issues where Vesktop would go blank while backgrounded.
The issue is likely fixed now, at least I cannot reproduce.
The best way to test it out is to just remove them and see if anyone complains :P

Also adds back the bandai fix for the obscure app-region bug which was removed in an earlier commit.
Turns out this is still a bug.'
'
This commit is contained in:
Vendicated 2026-09-06 02:50:21 +02:00
parent af114dab7c
commit 7764f2512a
No known key found for this signature in database
GPG key ID: D66986BAF75ECF18
3 changed files with 5 additions and 23 deletions

View file

@ -18,6 +18,7 @@
// DO NOT REMOVE UNLESS YOU WISH TO FACE THE WRATH OF THE CIRCULAR DEPENDENCY DEMON!!!!!!!
import "~plugins";
import "./fixWeirdAppRegionBug.css";
export * as Api from "./api";
export * as Plugins from "./api/PluginManager";

View file

@ -0,0 +1,4 @@
/* Works around a very strange issue where *something* (electron?) will inject body { app-region: drag } when using online themes */
body {
app-region: unset;
}

View file

@ -79,8 +79,6 @@ if (!IS_VANILLA) {
const original = options.webPreferences.preload;
options.webPreferences.preload = join(__dirname, "preload.js");
options.webPreferences.sandbox = false;
// work around discord unloading when in background
options.webPreferences.backgroundThrottling = false;
if (frameless) {
options.frame = false;
@ -136,27 +134,6 @@ if (!IS_VANILLA) {
});
process.env.DATA_DIR = join(app.getPath("userData"), "..", "Vencord");
// Monkey patch commandLine to:
// - disable UseEcoQoSForBackgroundProcess: Work around Discord unloading when in background
const originalAppend = app.commandLine.appendSwitch;
app.commandLine.appendSwitch = function (...args) {
if (args[0] === "disable-features") {
const disabledFeatures = new Set((args[1] ?? "").split(","));
disabledFeatures.add("UseEcoQoSForBackgroundProcess");
args[1] += [...disabledFeatures].join(",");
}
return originalAppend.apply(this, args);
};
// disable renderer backgrounding to prevent the app from unloading when in the background
// https://github.com/electron/electron/issues/2822
// https://github.com/GoogleChrome/chrome-launcher/blob/5a27dd574d47a75fec0fb50f7b774ebf8a9791ba/docs/chrome-flags-for-tools.md#task-throttling
// Work around discord unloading when in background
// Discord also recently started adding these flags but only on windows for some reason dunno why, it happens on Linux too
app.commandLine.appendSwitch("disable-renderer-backgrounding");
app.commandLine.appendSwitch("disable-background-timer-throttling");
app.commandLine.appendSwitch("disable-backgrounding-occluded-windows");
} else {
console.log("[Vencord] Running in vanilla mode. Not loading Vencord");
}