Add WDA_EXCLUDEFROMCAPTURE support to hide edge light from screen capture#22
Merged
shanselman merged 5 commits intomasterfrom Dec 8, 2025
Merged
Conversation
- Add AppSettings class for persistent configuration storage - Add P/Invoke declarations for SetWindowDisplayAffinity Windows API - Implement exclude from capture functionality for main and additional monitor windows - Add tray menu option with checkmark for the feature - Add control toolbar button (🎥) for quick toggle - Persist setting across application restarts using JSON configuration - Update README with comprehensive documentation about screen sharing mode - Update help dialog to mention the new feature Co-authored-by: shanselman <2892+shanselman@users.noreply.github.com>
… feature - Add error handling to SetWindowDisplayAffinity calls with debug logging - Improve JSON deserialization with validation and error recovery - Update button tooltip to clearly indicate current state for better accessibility - Add SetLastError to P/Invoke declaration for proper error reporting Co-authored-by: shanselman <2892+shanselman@users.noreply.github.com>
- Store error code immediately after API call to ensure accuracy - Add missing System namespace import in AppSettings.cs Co-authored-by: shanselman <2892+shanselman@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add flag to exclude edge lighting from screen capture
Add WDA_EXCLUDEFROMCAPTURE support to hide edge light from screen capture
Dec 6, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements the Windows
WDA_EXCLUDEFROMCAPTUREdisplay affinity flag so the edge light remains visible locally but invisible to screen sharing apps (Teams, Zoom) and screenshot tools. Made optional since screenshots won't capture the effect when enabled.Changes
Core Implementation
SetWindowDisplayAffinitywithWDA_EXCLUDEFROMCAPTURE(0x00000011)Settings Persistence
%APPDATA%\WindowsEdgeLight\settings.jsonUI Controls
Setting defaults to
falseto preserve existing screenshot behavior.Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.