Fixed the detection of the primary display on Windows.