Screenshare: Vesktop cancel opens full picker, not a 30s window
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
e6120f821a
commit
a7c4513d4e
3 changed files with 44 additions and 9 deletions
30
patches/vesktop-cancel-shows-picker.patch
Normal file
30
patches/vesktop-cancel-shows-picker.patch
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
--- 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] } : {});
|
||||
Loading…
Add table
Add a link
Reference in a new issue