Mir

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

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

This seems a bit odd and smells fishy:
examples/server_example_canonical_window_manager.cpp

Why any change to examples? The policy and logic for resize constraints should be entirely in src/server/. Nothing should need to be implemented by consumers of CanonicalWindowManager. The goal is to implement WM policy once (src/server/), and not in each shell.

The default policy should just use best fit and modify any requested dimensions so that they satisfy the constraints. For example:
 * Policy is 16:9 aspect ratio and shell tries to set 80x80 -> new size is 80x45
 * Policy is increments of 8x16 (a terminal) and shell tries to set 812x323 -> new size is 808x320 or 816x336 (depending on the previous dimensions and direction of resize).

So the goal is policy enforcement with the simplest interface possible, which is no code change required to any shell.

review: Needs Information

« Back to merge proposal