if ((mask & OS.Mod1Mask) != 0) event.stateMask |= SWT.ALT; if ((mask & OS.ShiftMask) != 0) event.stateMask |= SWT.SHIFT; if ((mask & OS.ControlMask) != 0) event.stateMask |= SWT.CONTROL; if ((mask & OS.Button1Mask) != 0) event.stateMask |= SWT.BUTTON1; if ((mask & OS.Button2Mask) != 0) event.stateMask |= SWT.BUTTON2; if ((mask & OS.Button3Mask) != 0) event.stateMask |= SWT.BUTTON3;
setInputState (event, xEvent);
void sendMouseEvent (int type, int button, int mask, XWindowEvent xEvent) {	Event event = new Event ();	event.time = xEvent.time;	event.button = button;	event.x = xEvent.x;  event.y = xEvent.y;	if ((mask & OS.Mod1Mask) != 0) event.stateMask |= SWT.ALT;	if ((mask & OS.ShiftMask) != 0) event.stateMask |= SWT.SHIFT;	if ((mask & OS.ControlMask) != 0) event.stateMask |= SWT.CONTROL;	if ((mask & OS.Button1Mask) != 0) event.stateMask |= SWT.BUTTON1;	if ((mask & OS.Button2Mask) != 0) event.stateMask |= SWT.BUTTON2;	if ((mask & OS.Button3Mask) != 0) event.stateMask |= SWT.BUTTON3;	postEvent (type, event);}