How vijayaragavanse/screendefender works
ScreenDefender is a Windows command-line utility that creates per-monitor watermark overlays, with an option to mark those overlay windows as capture-excluded. The principal workflow parses text, image-path, or base64-file options, starts the overlay thread, enumerates monitors, and renders refreshed watermark layers. The README also claims broader screenshot and screen-sharing blocking and secure display mode; the sampled implementation shows display-affinity settings on overlay windows, but not system-wide capture prevention. The graph reflects calls visible in sampled source and README-documented capabilities; unsampled internals are not inferred.
Main entry points: overlay.cpp Monitor windows · main.cpp Option parsing · watermark.cpp Watermark bitmap · README.md Secure display mode
Components 13
Configuration and runtime
- Option parsing
src/main.cpp - Overlay thread
src/overlay.cpp
Overlay management
- Monitor windows
src/overlay.cpp - Capture affinity
src/overlay.cpp - Refresh and rebuild
src/overlay.cpp - Watermark placement
src/overlay.cpp - Secure display mode
README.md
Watermark rendering
- Watermark bitmap
src/watermark.cpp - Text conversion
src/watermark.cpp
Image input
- Base64 validation
src/base64.cpp - Image loading
src/overlay.cpp
Other components
- Operator
- Capture and sharing tools
Connections 12
- Operator → Option parsing: sets options
src/main.cpp - Option parsing → Overlay thread: starts
src/main.cpp - Overlay thread → Monitor windows: enumerates monitors
src/overlay.cpp - Monitor windows → Capture affinity: sets affinity
src/overlay.cpp - Monitor windows → Watermark placement: computes positions
src/overlay.cpp - Monitor windows → Image loading: loads image
src/overlay.cpp - Image loading → Base64 validation: validates and decodes
src/overlay.cpp - Overlay thread → Refresh and rebuild: refreshes overlays
src/overlay.cpp - Refresh and rebuild → Watermark bitmap: requests bitmap
src/overlay.cpp - Watermark bitmap → Text conversion: converts text
src/watermark.cpp - Capture and sharing tools → Secure display mode: blocked by feature
README.md - Operator → Secure display mode: enables capture protection
README.md