This patch band-aids (not super happy with the solution, but also don't really see a nicer way) the issues with minimized windows in T42489 / T52936
Problem seems to be coming from the initial layout of the window, if the window is too small or has a bogus width and height, the layout engine kinda goes wonky. (haven't looked into why, but it's easy to guess what could go wrong there) , on top of that on windows you do not get sane values for `GetClientRect` on minimized windows. This patch band-aids the issue by checking if the newly created window has a valid size and only overwrite the stored values if that is the case.