From 9079931f87c2a2f150eaa2100880de929696d630 Mon Sep 17 00:00:00 2001 From: ciregenz Date: Fri, 31 Jul 2026 22:01:46 -0700 Subject: [PATCH] [eric] electron: keep compositing an occluded window so a covered app is not a blind agent --- electron/main.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/electron/main.js b/electron/main.js index 44eb7d44..7123adbf 100644 --- a/electron/main.js +++ b/electron/main.js @@ -439,6 +439,11 @@ app.commandLine.appendSwitch('autoplay-policy', 'no-user-gesture-required'); // timeout the moment the user looked away. Same lever VS Code ships with. app.commandLine.appendSwitch('disable-renderer-backgrounding'); app.commandLine.appendSwitch('disable-background-timer-throttling'); +// The other half of that same problem: those two keep a guest's SCRIPTS running, this keeps its +// PIXELS coming. Chromium marks a fully covered window occluded and stops compositing it, and a +// guest with no composited frame cannot be screenshotted at all (capturePage never even settles), +// so the agent went blind the moment you put another window in front of OpenSwarm. +app.commandLine.appendSwitch('disable-backgrounding-occluded-windows'); // Heavy WebGL/webview churn (spam-switching apps, busy dashboards) can crash the // shared GPU process; Chromium kills the whole app after a few GPU crashes. Lift // that cap so a GPU hiccup recovers by restarting the GPU process instead of