Skip to content

Fix compilation errors with macOS 26 SDK#20

Open
mihilista wants to merge 1 commit into
lhaeger:masterfrom
mihilista:fix/macos-26-sdk-compatibility
Open

Fix compilation errors with macOS 26 SDK#20
mihilista wants to merge 1 commit into
lhaeger:masterfrom
mihilista:fix/macos-26-sdk-compatibility

Conversation

@mihilista

Copy link
Copy Markdown

Summary

  • Add explicit (AXValueType) casts to AXValueGetValue() calls — the macOS 26 SDK no longer implicitly converts UInt32 (kAXValueCGSizeType, kAXValueCGPointType) to AXValueType
  • Replace literal 0 with kCGEventTapOptionDefault in CGEventTapCreate() — the SDK now requires the proper CGEventTapOptions enum type

These are backwards-compatible changes (the casts and enum constant have the same values as before).

Test plan

  • Builds successfully with g++ -O2 -Wall -fobjc-arc -o AutoRaise AutoRaise.mm -framework AppKit on macOS 26 (Xcode 26.3)

The macOS 26 SDK enforces stricter enum typing:
- AXValueGetValue() no longer accepts bare kAXValueCG*Type constants
  (UInt32) where AXValueType is expected — add explicit casts.
- CGEventTapCreate() no longer accepts literal 0 for CGEventTapOptions
  — use kCGEventTapOptionDefault instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant