Mir

Code review comment for lp:~vanvugt/mir/managed-surface

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Robert:
I spent over a week trying out the existing controller pattern and discussed it at several team meetings. The result was something that worked, but so ugly that I decided not to propose it (lp:~vanvugt/mir/states). So I spent another week on this one which actually solves a lot more problems, more elegantly.

This branch has added advantages over SurfaceController:
 * You can't call a_scene_surface->some_method() and accidentally bypass the management policy.
 * Any surface functionality can be modified by the shell in future this way.
 * Any surface metadata can be neatly attached to a surface instance by the shell, without touching the core BasicSurface. e.g. the restore location and soon a lot more like decoration state, minimize location, animation state etc.

So this approach solves a whole bunch of problems. And admittedly even during my first prototype where everything was in SurfaceController, I was aware that these other problems would necessitate a surface wrapping approach eventually anyway.

P.S. Any number of surfaces can be full screen on normal desktops right now. While a shell can choose to restrict that, it would be unusual.

« Back to merge proposal