mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-27 23:24:32 +00:00
Fix brightness HUD not working on macOS Tahoe 26.5
The brightness HUD broke on Tahoe because Apple deprecated/changed the DisplayServices private framework and stopped posting the BezelEngine distributed notifications that Atoll relied on for change detection. This commit: - Adds CoreBrightnessDisplayClient using Apple's CoreBrightness framework (mirrors the existing KeyboardBrightnessClient pattern) as the primary brightness read/write path - Falls back gracefully to DisplayServices then IODisplay if CoreBrightness is unavailable - Adds a lightweight polling fallback (150ms) so the HUD fires even when no distributed notifications are posted (Control Center, Touch Bar, auto- brightness changes) - Registers the new com.apple.CoreBrightness.DisplayBrightnessChanged notification - Fixes deprecated kIOMasterPortDefault → kIOMainPortDefault in SystemDisplayManager.swift Fixes #452 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
bc858401c7
commit
fc063499ae
3 changed files with 110 additions and 2 deletions
|
|
@ -46,7 +46,7 @@ class SystemDisplayManager {
|
|||
|
||||
private static func getStandardDisplayBrightness() throws -> Float {
|
||||
var brightness: float_t = 1
|
||||
let service = IOServiceGetMatchingService(kIOMasterPortDefault, IOServiceMatching("IODisplayConnect"))
|
||||
let service = IOServiceGetMatchingService(kIOMainPortDefault, IOServiceMatching("IODisplayConnect"))
|
||||
defer {
|
||||
IOObjectRelease(service)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue