How to resolve CGDirectDisplayID changing issues on newer multi-GPU Apple laptops in Core Foundation
- by Dave Gallagher
In Mac OS X, every display gets a unique CGDirectDisplayID number assigned to it. You can use CGGetActiveDisplayList() or [NSScreen screens] to access them, among others. Per Apple's docs:
A display ID can persist across
processes and system reboot, and
typically remains constant as long as
certain display parameters do not
change.
…