Add cursor clipping (Thanks to Koruruu)