Fixed the Window class freezing on Windows and being positioned incorrectly on Linux.