mirror of
https://github.com/MonitorControl/MonitorControl.git
synced 2026-10-23 08:07:35 -06:00
[PR #1877] Exclude software-dimming overlay windows from screen capture #1321
Labels
No labels
Status: Abandoned
arm64
beta
beta
bug
done
duplicate
enhancement
feedback needed from reporter
in progress
information
invalid
investigating
known Issue
monitor Issue
pull-request
translation
unable to reproduce
unreleased
x86
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github-starred/MonitorControl#1321
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/MonitorControl/MonitorControl/pull/1877
Author: @compoundworks
Created: 6/27/2026
Status: 🔄 Open
Base:
main← Head:fix/exclude-dimming-overlay-from-screen-capture📝 Commits (2)
ed07a0cfix: exclude software-dimming overlay windows from screen capture4d62fa9Only exclude shade from capture on non-virtual displays📊 Changes
1 file changed (+9 additions, -0 deletions)
View changed files
📝
MonitorControl/Support/DisplayManager.swift(+9 -0)📄 Description
Problem
When a display is dimmed using software dimming (the black "shade" overlay), screenshots and screen recordings of that display come out darkened — the capture includes the dimming overlay. This is most visible on displays that have no DDC and no gamma support, such as DisplayLink / virtual displays, where the shade overlay is the only dimming mechanism available.
Reported in:
Root cause
DisplayManager.createShadeOnDisplay(...)creates a full‑screen blackNSWindowto act as the dimming shade, but never sets itssharingType. The default is.readOnly, so the shade window is visible to the screen‑capture system (CGWindowList/ ScreenCaptureKit). Any screenshot or recording taken while a display is dimmed therefore captures the shade and looks dark. The same applies to the 1×1gammaActivityEnforcerhelper window.Fix
Set
sharingType = .noneon the shade windows and the gamma activity enforcer. These windows are display‑only chrome; excluding them from capture does not change what the user sees on screen — the display stays visibly dimmed, but captures are taken from the content underneath.Verification (macOS 15, DisplayLink displays)
Enumerated MonitorControl's on‑screen windows via
CGWindowListCopyWindowInfoand readkCGWindowSharingState:1(ReadOnly → captured)0(None → excluded)1(captured)0(excluded)With the fix, the dimmed display still looks dimmed to the eye, but
screencaptureof that display no longer includes the shade — screenshots come out at normal brightness. An isolated test window withsharingType = .noneconfirmed it is excluded from capture (content behind shows through) rather than rendered black.No behavior change for users who don't use software dimming.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.