Mir

Code review comment for lp:~albaguirre/mir/add-menu-api

Revision history for this message
Gerry Boland (gerboland) wrote :

Weighing in as an external perspective, I must agree with Daniel. Having a method for each surface type will result in a huge number of methods. Plus if/when we change surface type names, we'll be carrying around the old names for some time.

We have an enum with surface types already. Why can't that be passed as a parameter to a mir_connection_create_spec_for_surface_type.

Also why pass parent, rect & format as arguments? Why not just ask for a surface type, be returned a MirSurfaceSpec, which then we can set parent,rect,format upon (if possible)

I ask because I expect we'll later want to specify extra properties when creating a surface, things like surface state (fullscreen/maximized/min), position (x,y relative to parent), decoration style (client or server decorations), min/max width/height, window title...

So as opposed to adding more parameters to that function to set properties of MirSurfaceSpec, instead allow those properties to be set once we've got a MirSurfaceSpec.

« Back to merge proposal