The state change might have applied the new config already, or might have triggered some new requests which would override the new config.
It's also necessary to call again to compute the visible rect from the window rect after taking the new state into account. Minimized windows have a different window / visible rect offset than normal windows for instance.