I need to monitor for any screen resolution changes in my app, coming with my app in front or not.
I searched a lot on the internet yesterday and tried all these options:
applicationDidChangeScreenParameters;
CGDisplayRegisterReconfigurationCallback;
NSApplicationDidChangeScreenParametersNotification;
I get notifications when I change the resolution manually or plug/unplug a new display.
But I do not get notifications when other applications changes the screen parameters (most games made before 2011).
Is there any way to know if Any mac application changes the screen resolution? Even if my app is in the background? Any notification? Hopefully without Accessibility API...?
Thank you very much
EDIT (June 9)
This answer Events when dock is showing or hiding helped me a little bit. Since I get the notification when another app enters/exits fullscreen, but not when it changes the resolution without changing the fullscreen state =/ And it relies on Carbon APIs which are deprecated on 10.8...
It is not exactly what I want but works for most cases... Is there any other way to achieve on cocoa? Any global notification for this?