问题
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?
来源:https://stackoverflow.com/questions/31475656/issues-with-screen-capture-on-os-x-cgdisplaycreateimage