Moved cursor clipping into a single method setCursorClipped() and fixed resizing events not updating the clipping properly.