Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(desktop): boot the main window unthrottled so cold start paints at full speed #7460

Mergedt3dotgg(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/7460/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

Showing 2 changed files with 43 additions and 1 deletion.

x
0 of 2 viewed, 2 left
32 additions and 1 deletionapps/desktop/src/window/DesktopWindow.test.tsModified
View file
@@ -80,6 +80,7 @@
reload: vi.fn(),
replaceMisspelling: vi.fn(),
send: vi.fn(),
+ setBackgroundThrottling: vi.fn(),
setWindowOpenHandler: vi.fn(),
};
​
@@ -124,6 +125,7 @@
reload: webContents.reload,
send: webContents.send,
setZoomLevel: webContents.setZoomLevel,
+ setBackgroundThrottling: webContents.setBackgroundThrottling,
setAutoHideCursor: window.setAutoHideCursor,
webContentsListeners,
windowListeners,
@@ -455,7 +457,7 @@
assert.isUndefined(createdWindowOptions[0]?.x);
assert.isUndefined(createdWindowOptions[0]?.y);
assert.isTrue(createdWindowOptions[0]?.disableAutoHideCursor);
- assert.isUndefined(createdWindowOptions[0]?.webPreferences?.backgroundThrottling);
+ assert.isFalse(createdWindowOptions[0]?.webPreferences?.backgroundThrottling);
assert.deepEqual(fakeWindow.setAutoHideCursor.mock.calls, [[false]]);
assert.deepEqual(fakeWindow.loadURL.mock.calls[0], ["t3code-dev://app/"]);
assert.equal(fakeWindow.openDevTools.mock.calls.length, 1);
@@ -604,6 +606,35 @@
}),