Fixed Windows DPI scaling causing strange window behavior (#679).

Fixes #679.