Fix electron windows screen and window picker for screensharing
All checks were successful
Queue Release Build / prepare (push) Successful in 44s
Queue Release Build / build-windows (push) Successful in 32m25s
Queue Release Build / build-linux (push) Successful in 42m57s
Queue Release Build / finalize (push) Successful in 3m41s

This commit is contained in:
2026-03-11 14:39:47 +01:00
parent 22f583e6b3
commit 7b3caa0b61
14 changed files with 735 additions and 132 deletions

View File

@@ -204,12 +204,22 @@ export function setupSystemHandlers(): void {
});
ipcMain.handle('get-sources', async () => {
const sources = await desktopCapturer.getSources({
types: ['window', 'screen'],
thumbnailSize: { width: 150, height: 150 }
});
const thumbnailSize = { width: 240, height: 150 };
const [screenSources, windowSources] = await Promise.all([
desktopCapturer.getSources({
types: ['screen'],
thumbnailSize
}),
desktopCapturer.getSources({
types: ['window'],
thumbnailSize,
fetchWindowIcons: true
})
]);
const sources = [...screenSources, ...windowSources];
const uniqueSources = new Map(sources.map((source) => [source.id, source]));
return sources.map((source) => ({
return [...uniqueSources.values()].map((source) => ({
id: source.id,
name: source.name,
thumbnail: source.thumbnail.toDataURL()

View File

@@ -729,7 +729,7 @@ export function restartToApplyUpdate(): boolean {
return false;
}
autoUpdater.quitAndInstall(false, true);
autoUpdater.quitAndInstall(true, true);
return true;
}