Revert "Revert "Set window state on platform window creation""

This reverts commit 1c1c7f08e6af2605b74fe6ebe2afd97918b003ff.