Mouse is captured on Windows

Fixes #450, and takes care that you don't hit the border