title: SWT and full disabling and hide mouse pointer
body: <p>I need some help to hide and disabling mouse pointer. But I need to send all mouse events to an other device.
  So main scenario is: open SWT application --> press button (or label, or what you want...) --> disappearing mouse SWT-side, no pointer, no event --> mouse pointer appear in other device --> I can control other device's mouse pointer from main physically mouse.</p>
  
  <p>What I found by now is how to make pointer transparent and I thought about timer that could fix location each 20ms. But how can I prevent events? And can I still catch them?</p>
  
  <p>Regards</p>
  
  <p>Update:</p>
  
  <p>Final solution: new full-screen window semi-transparent</p>
  
  <pre><code>public class AntiMouseGui {
  
      Display display;
      Shell shell;
  
      final int time = 20;
  
      private Runnable timer = null;
  
      public AntiMouseGui(final Display display, final DebugForm df, final PrintWriter socketOut) {
  
          Image bg = new Image(display, "icons/hide_mouse_wallpapaer.png");
  
          shell = new Shell(display, SWT.NO_TRIM | SWT.ON_TOP);
  
          final int dis_x = display.getClientArea().width, dis_y = display.getClientArea().height;
          shell.setSize(dis_x, dis_y);
  
          shell.setBackgroundImage(bg);
          shell.setAlpha(50);
          shell.setMinimumSize(shell.getSize()); 
          shell.open();
  
  
          timer = new Runnable() {
              public void run() {
                  Point cur_loc = display.getCursorLocation();
                  int span_x = dis_x / 2 - cur_loc.x, span_y = dis_y / 2 - cur_loc.y;
  
                  df.appendTxt("span x = " + span_x + " span y = " + span_y);
                  if (span_x != 0) Controller.moveMouseRight(socketOut, -span_x);
                  if (span_y != 0) Controller.moveMouseDown(socketOut, -span_y);
  
                  display.setCursorLocation(new Point(dis_x / 2, dis_y / 2));
                  if (!shell.isDisposed()) display.timerExec(time, this);
              }
          };
          display.timerExec(time, timer);
  
      }
  
  }
  </code></pre>