--- a/src/main/screenShare.ts +++ b/src/main/screenShare.ts @@ -5,6 +5,8 @@ */ import { desktopCapturer, session, Streams } from "electron"; +import { writeFileSync } from "fs"; +import { join } from "path"; import type { StreamPick } from "renderer/components/ScreenSharePicker"; import { IpcCommands, IpcEvents } from "shared/IpcEvents"; @@ -55,7 +57,17 @@ skipPicker: true }).catch(() => null); - if (stream === null) return callback({}); + if (stream === null) { + // Cancelled: tell the auto-picking XDPH picker (FredOS settings/hyprland.nix) + // to show the full picker on the next share. + try { + writeFileSync( + join(process.env.XDG_RUNTIME_DIR ?? "/tmp", "xdph-pick-manually"), + String(Math.floor(Date.now() / 1000)) + ); + } catch {} + return callback({}); + } } callback(video ? { video: sources[0] } : {});