Repository navigation
Commit fe56fa2
fix(macos): raise the Screen Recording prompt on first run
`requestScreenAccess` only raised the TCC prompt when
`getMediaAccessStatus("screen")` returned "not-determined", which macOS
never reports. Chromium resolves that permission through
`CGPreflightScreenCaptureAccess()`, a bool, so a machine that has never
been asked is indistinguishable from an explicit refusal and both arrive
as "denied".
A first run therefore fell straight through to the "open System Settings"
dialog without macOS ever being asked, leaving a manual toggle as the only
way to grant. The renderer's retry loop in openSourceSelectorFlow arms on
the same status and never ran either.
Decide from whether this launch has already asked instead. The first ask
raises the prompt and reports "not-determined" so the retry loop arms;
later asks report the real status so the Settings dialog still reaches a
user who genuinely refused, without re-prompting on every click.
Verified on macOS 26.2: with no TCC screen-capture row for the bundle,
getMediaAccessStatus("screen") returns "denied" while
getMediaAccessStatus("camera") returns "not-determined".
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent df4e00a commit fe56fa2
3 files changed
Lines changed: 66 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
82 | 83 | | |
83 | 84 | | |
84 | 85 | | |
| |||
455 | 456 | | |
456 | 457 | | |
457 | 458 | | |
| 459 | + | |
| 460 | + | |
458 | 461 | | |
459 | 462 | | |
460 | 463 | | |
| |||
1674 | 1677 | | |
1675 | 1678 | | |
1676 | 1679 | | |
1677 | | - | |
| 1680 | + | |
| 1681 | + | |
| 1682 | + | |
| 1683 | + | |
| 1684 | + | |
| 1685 | + | |
| 1686 | + | |
| 1687 | + | |
1678 | 1688 | | |
1679 | 1689 | | |
1680 | 1690 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
0 commit comments