1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

disable paintWhenInitiallyHidden

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
Jari Kolehmainen 2023-03-20 14:02:45 +02:00
parent a72ec0d984
commit 430e2f602c
2 changed files with 2 additions and 8 deletions

View File

@ -13,14 +13,8 @@ const resolveSystemProxyFromElectronInjectable = getInjectable({
const helperWindow = di.inject(resolveSystemProxyWindowInjectable); const helperWindow = di.inject(resolveSystemProxyWindowInjectable);
const withErrorLoggingFor = di.inject(withErrorLoggingInjectable); const withErrorLoggingFor = di.inject(withErrorLoggingInjectable);
const withErrorLogging = withErrorLoggingFor(() => "Error resolving proxy"); const withErrorLogging = withErrorLoggingFor(() => "Error resolving proxy");
let loaded = false;
return withErrorLogging(async (url: string) => { return withErrorLogging(async (url: string) => {
if (!loaded) {
await helperWindow.loadURL("about:blank");
loaded = true;
}
return await helperWindow.webContents.session.resolveProxy(url); return await helperWindow.webContents.session.resolveProxy(url);
}); });
}, },

View File

@ -8,7 +8,7 @@ import { BrowserWindow } from "electron";
const resolveSystemProxyWindowInjectable = getInjectable({ const resolveSystemProxyWindowInjectable = getInjectable({
id: "resolve-system-proxy-window", id: "resolve-system-proxy-window",
instantiate: () => { instantiate: () => {
return new BrowserWindow({ show: false }); return new BrowserWindow({ show: false, paintWhenInitiallyHidden: false });
}, },
causesSideEffects: true, causesSideEffects: true,
}); });