From 4b1738aae8fd10165332cd25b12be71df4e8d546 Mon Sep 17 00:00:00 2001 From: Louis Date: Fri, 25 Sep 2026 16:44:12 +0200 Subject: [PATCH] =?UTF-8?q?Linux:=20Neustart=20mit=20--ozone-platform=3Dx1?= =?UTF-8?q?1=20statt=20appendSwitch=20(GPU-Prozess=20st=C3=BCrzte=20ab,=20?= =?UTF-8?q?kein=20Fenster=20im=20installierten=20Paket)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- src/main/main.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/main.js b/src/main/main.js index 4c17e3a..42186bc 100644 --- a/src/main/main.js +++ b/src/main/main.js @@ -17,7 +17,12 @@ const store = new Store(); // Die Wahl wird unverschlüsselt in launch.json gespeichert, weil sie vor dem Start des Fensters gebraucht wird. const launchFile = path.join(app.getPath('userData'), 'launch.json'); function readLaunch() { try { return JSON.parse(fs.readFileSync(launchFile, 'utf8')); } catch { return {}; } } -if (process.platform === 'linux' && readLaunch().x11 !== false) app.commandLine.appendSwitch('ozone-platform', 'x11'); +// appendSwitch kommt für ozone-platform zu spät (Browser läuft schon unter Wayland, GPU-Prozess stürzt ab), +// daher einmalig mit dem Schalter auf der Kommandozeile neu starten. +if (process.platform === 'linux' && readLaunch().x11 !== false && !process.argv.some(a => a.startsWith('--ozone-platform'))) { + app.relaunch({ args: process.argv.slice(1).concat('--ozone-platform=x11') }); + app.exit(0); +} const pendingSecrets = new Map(); function send(channel, ...args) {