This is the plan: when the resolution is changed for the primary display (i.e. changing the resolution of your laptop display or hooking up to an external monitor and using that as the primary display) apply the window size and positions for that specific resolution.
Imagine you are working with two resolutions, A and B. When using A, you have your Safari window at 400 by 600 and at position 12 (for examples sake). When you switch to resolution B the application loads up the window data for that resolution and Safari's window then becomes 800 by 12 and position 45.
Obviously, if you selected a resolution that didn't have any window data yet, then the windows would remain in the positions prior to the resolution change and when you adjusted them, they would become the preset for that resolution.
This happens for all windows for all applications. The idea is, if you work with an external monitor for your laptop and are switching between being connected to the external display, then you don't have to worry about having to constantly resize your windows.
I like Safari to be a set size on 1440x900, but when on my external monitor at 1920x1200 I want Safari to be much bigger and in a different position. When switching between the two resolutions, I have to resize Safari. The same applies to every application I work with.
So how easy/hard would it be to implement this? My logic would be to store the window data for each resolution, and then load it when that specific resolution is selected.
For now, it doesn't need to be done automatically - could manually select what preset for window data you want just to get it working.
Any pointers would be great, especially if there is any API's that could make it easier.
Imagine you are working with two resolutions, A and B. When using A, you have your Safari window at 400 by 600 and at position 12 (for examples sake). When you switch to resolution B the application loads up the window data for that resolution and Safari's window then becomes 800 by 12 and position 45.
Obviously, if you selected a resolution that didn't have any window data yet, then the windows would remain in the positions prior to the resolution change and when you adjusted them, they would become the preset for that resolution.
This happens for all windows for all applications. The idea is, if you work with an external monitor for your laptop and are switching between being connected to the external display, then you don't have to worry about having to constantly resize your windows.
I like Safari to be a set size on 1440x900, but when on my external monitor at 1920x1200 I want Safari to be much bigger and in a different position. When switching between the two resolutions, I have to resize Safari. The same applies to every application I work with.
So how easy/hard would it be to implement this? My logic would be to store the window data for each resolution, and then load it when that specific resolution is selected.
For now, it doesn't need to be done automatically - could manually select what preset for window data you want just to get it working.
Any pointers would be great, especially if there is any API's that could make it easier.