Fixes window cursor functions

There were typos and other issues. Fixes #828 for Win32 and XLIB