Apply max constraints to primary window