Mir

Code review comment for lp:~alan-griffiths/mir/resize-examples

Revision history for this message
Alberto Aguirre (albaguirre) wrote :

It looks like this would be a pretty common thing a client needs to do:

    mir_render_surface_set_size(surface, new_width, new_height);
    MirWindowSpec* spec = mir_create_window_spec(mir_window_get_connection(window));
    mir_window_spec_add_render_surface(spec, surface, new_width, new_height, 0, 0);
    mir_window_apply_spec(window, spec);
    mir_window_spec_release(spec);

Maybe a convenience api should be introduced? maybe mir_window_resize_content(MirWindow* window, MirRenderSurface* surface, int new_width, int new_height) ? Just a thought...

« Back to merge proposal