mmg: remember window positions & sizes

Implements #878.