Fixed a bug where the cursor was shown while it should have been invisible as the user uses setMouseCursor.