fix the empty rect when not setting mainwin rect