Moved a lot more cursor handling to the window class