This, in addition to the previous commit, allows Centre() to work correctly as it needs to retrieve the parent window rectangle. See #17768.