Ryan Knopp
Ryan Knopp

Reputation: 612

OSX cocoa detecting a monitor removal or addition

I'm looking for a event that will tell me if someone added/remove a monitor on OSX. I was looking at the NSScreen class but I'm not seeing anything there. NSScreen does have a NSScreenColorSpaceDidChangeNotification but I don't think that will do what I want it to. I'm not coming up with much with a google search.

Any help will be appreciated, thanks!

Upvotes: 1

Views: 95

Answers (1)

jtbandes
jtbandes

Reputation: 118671

CGDisplayRegisterReconfigurationCallback lets you register a function to be called when displays are changed.

Upvotes: 1

Related Questions