My app responds poorly to screen resolution changes. For example, if I have a window with origin (0,0) -- the lower-left hand corner of the screen -- and I up the resolution, the origin becomes (0, -45). Also, when the window is to the top or to the right of the screen and I drop the screen resolution, my window will often disappear off the screen. When I increase the resolution again it usually goes back to its old position (but sometimes the origin is reset to (0,0)).
I would like to fix this. Basically, after the screen resolution changes, I would like my app to notice it and move the window onto the screen, with the same position relative to the closest window borders as it had before the resolution change. So, for instance, if the window is in a corner before the resolution change, it will have the same position relative to that corner after the resolution change.
How can I do this? Is there a delegate method I've missed that notifies me when the screen resolution changes? Should I be constantly checking whether [[NSScreen mainScreen] frame] has changed? Should I ignore the problem, since most of the applications I have seen don't handle resolution changes very well?
A somewhat related question is: What, if anything, should I do to support multiple montors? I only have one monitor, so this is going to be hard to test.