feat: Send whether each source is a fullscreen source
Signed-off-by: Jacob Schlecht <dadadah@echoha.us>
This commit is contained in:
parent
3d02f30a90
commit
45b949e1ae
|
|
@ -221,7 +221,11 @@ export function createMainWindow() {
|
|||
mainWindow.webContents.send(
|
||||
"screenPicker",
|
||||
sources.map((source, idx) => {
|
||||
return { idx: idx, name: source.name };
|
||||
return {
|
||||
idx: idx,
|
||||
isFullScreen: source.id.startsWith("screen"),
|
||||
name: source.name,
|
||||
};
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -18,7 +18,9 @@ contextBridge.exposeInMainWorld("native", {
|
|||
|
||||
// Wrapped in braces to return void
|
||||
onceScreenPicker: (
|
||||
onScreenPick: (sources: { idx: number; name: string }[]) => void,
|
||||
onScreenPick: (
|
||||
sources: { idx: number; isFullScreen: boolean; name: string }[],
|
||||
) => void,
|
||||
) => {
|
||||
ipcRenderer.once("screenPicker", (_, sources) => onScreenPick(sources));
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue