I am using CGDisplayCreateImage(CGMainDisplayID())
to capture screen. When we do a fast user switch to another user, it still captures screen from first user. CGMainDisplayID()
on second user returns 1104977152. Any idea why this is happening?
My intention is to capture active screen. In case of mirroring, I don't mind capturing the active display.
Other than Quartz APIs, any other suggestions?