feat: Send whether each source is a fullscreen source

Signed-off-by: Jacob Schlecht <dadadah@echoha.us>
This commit is contained in:
Jacob Schlecht 2026-04-17 20:40:28 -06:00
parent 3d02f30a90
commit 45b949e1ae
2 changed files with 8 additions and 2 deletions

View File

@ -221,7 +221,11 @@ export function createMainWindow() {
mainWindow.webContents.send( mainWindow.webContents.send(
"screenPicker", "screenPicker",
sources.map((source, idx) => { sources.map((source, idx) => {
return { idx: idx, name: source.name }; return {
idx: idx,
isFullScreen: source.id.startsWith("screen"),
name: source.name,
};
}), }),
); );
}); });

View File

@ -18,7 +18,9 @@ contextBridge.exposeInMainWorld("native", {
// Wrapped in braces to return void // Wrapped in braces to return void
onceScreenPicker: ( onceScreenPicker: (
onScreenPick: (sources: { idx: number; name: string }[]) => void, onScreenPick: (
sources: { idx: number; isFullScreen: boolean; name: string }[],
) => void,
) => { ) => {
ipcRenderer.once("screenPicker", (_, sources) => onScreenPick(sources)); ipcRenderer.once("screenPicker", (_, sources) => onScreenPick(sources));
}, },