I'd like for my app to be able to restore the location of its windows based on 
the display configuration. For example, if you have a MacBook Pro and a Cinema 
Display to its left, and you put a window on one of those displays, I want to 
remember that window's geometry for that config.

If you then remove the external monitor, the window will move (if necessary) to 
the remaining display. If the user moves it again, I want to remember that 
position for that display config.

If the user then reattaches the external monitor, I want to be able to recall 
the old geometry and restore the window to that location.

If they add a different external display, that's a new configuration.

One way to do this is to iterate the displays using CGGetActiveDisplayList(), 
use CGDisplayVendorNumber() for each, sort them, build a string, and use that 
as a key into a dictionary of geometries. Maybe add the screen geometry to the 
string, in case vendor IDs overlap or are unknown.

But I want to check to see if there's not already a better solution in place, 
or just a better idea.

Thanks!

-- 
Rick




_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to