new solution to solve window resizing on different call order
(i'm looking at you, kusma!)