#37: combine HORIZONTAL and VERTICAL flags in one call, call unmaximize...

... before doing size calculations