Another thought is that we don't necessarily need mir_surface_spec_set_type().
We could, for example, do this:
void morph_to_a_dialog(MirSurface* some_existing_surface) { auto const spec = mir_connection_create_spec_for_modal_dialog(...); mir_surface_apply_spec(some_existing_surface, spec); mir_surface_spec_release(spec); }
This way we avoid the complexity of managing the required parameters for the new type.
The "con" is that it is then difficult to "inherit" parameters from the existing surface.
But this is not a problem with the current MP - we can still chose several options building upon it.
« Back to merge proposal
Another thought is that we don't necessarily need mir_surface_ spec_set_ type().
We could, for example, do this:
void morph_to_ a_dialog( MirSurface* some_existing_ surface) create_ spec_for_ modal_dialog( ...); surface_ apply_spec( some_existing_ surface, spec); surface_ spec_release( spec);
{
auto const spec = mir_connection_
mir_
mir_
}
This way we avoid the complexity of managing the required parameters for the new type.
The "con" is that it is then difficult to "inherit" parameters from the existing surface.
But this is not a problem with the current MP - we can still chose several options building upon it.