This matches the geometry used in the setWindowGeometry() function. (cherry picked from commit e8594be8)