Minor refactoring of CursorHider.