Having discussed this a few times I've reached the following conclusion:
"automatic" is not a MirSurfaceState - if it were a MirSurfaceState, then it would be correct to return it from get_state() and for it to be implemented as "looking the same as fullscreen or restored".
By comparison, "restored" can look like "maximized" on the phone or as windows on desktop and is what get_state() returns.
Instead it is additional metadata about the surface requesting a specific treatment of the MirSurfaceState.
So, I think the right approach for Mir is to have an additional surface attribute:
Having discussed this a few times I've reached the following conclusion:
"automatic" is not a MirSurfaceState - if it were a MirSurfaceState, then it would be correct to return it from get_state() and for it to be implemented as "looking the same as fullscreen or restored".
By comparison, "restored" can look like "maximized" on the phone or as windows on desktop and is what get_state() returns.
Instead it is additional metadata about the surface requesting a specific treatment of the MirSurfaceState.
So, I think the right approach for Mir is to have an additional surface attribute:
enum MirSurfaceState Policy surface_ state_policy_ default, surface_ state_policy_ qt_automatic,
{
mir_
mir_
...
};
With corresponding setter and getter functions on the MirSurfaceSpec*