code: @Override
      void setVisibility(boolean visibility) {
          if (isVisible && !visibility) {
              // make the X cursor invisible
              xLib.XDefineCursor(xdisplay, xwindow, transparentCursor);
              MonocleWindowManager.getInstance().repaintAll();
          } else if (!isVisible && visibility) {
              // make the cursor visible
              xLib.XUndefineCursor(xdisplay, xwindow);
              MonocleWindowManager.getInstance().repaintAll();
          }
          isVisible = visibility;
      }
docs: Set the cursor according to the current visibility and requested
  visibility
  @param visibility the new setting for the cursor's visibility.