From 4c622b6f8196a7604c20c83ed67c1d5c5c89cae1 Mon Sep 17 00:00:00 2001 From: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com> Date: Mon, 14 Nov 2022 11:29:53 -0800 Subject: [PATCH] Introduce --enable-gpu flag on Linux --- app/main.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/main.ts b/app/main.ts index 88842a3a8..99258ce59 100644 --- a/app/main.ts +++ b/app/main.ts @@ -161,6 +161,9 @@ const defaultWebPrefs = { spellcheck: false, }; +const DISABLE_GPU = + OS.isLinux() && !process.argv.some(arg => arg === '--enable-gpu'); + function showWindow() { if (!mainWindow) { return; @@ -1610,7 +1613,7 @@ app.commandLine.appendSwitch('password-store', 'basic'); // rendering is often utterly broken on Linux when using GPU // acceleration. -if (OS.isLinux()) { +if (DISABLE_GPU) { app.disableHardwareAcceleration(); }