Much improved handling of window/border states.
Fixed too high mouse scrolling speed.