Validate xscale when window size changes

Also fixes glitches on startup (during which computed width is negative)