Comment 5 for bug 1535397

Revision history for this message
Alan Griffiths (alan-griffiths) wrote : Re: [enhancement] Implement support for QWindow::visibility set to Automatic

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 MirSurfaceStatePolicy
{
    mir_surface_state_policy_default,
    mir_surface_state_policy_qt_automatic,
    ...
};

With corresponding setter and getter functions on the MirSurfaceSpec*