nixos/patches/vesktop-cancel-shows-picker.patch
rope a7c4513d4e Screenshare: Vesktop cancel opens full picker, not a 30s window
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 20:12:17 +01:00

30 lines
1.1 KiB
Diff

--- 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] } : {});