X11.FocusChangeMask |
//X11.PointerMotionMask |
X11.EnterWindowMask |
X11.LeaveWindowMask));
while (watcherRunning) {
final XEvent xEvent = new XEvent();
x11.XNextEvent(display, xEvent);
if (watcherRunning && !isDisposed()) {
getDisplay().asyncExec(new Runnable() {
public void run() {
if (watcherRunning && !isDisposed()) {
final Event swtEvent = new Event();
XCrossingEvent ce;
switch (xEvent.type) {
// case X11.MotionNotify:
// XMotionEvent e = (XMotionEvent)xEvent.readField("xmotion");
// swtEvent.x = e.x;
// swtEvent.y = e.y;
// notifyListeners(SWT.MouseMove, swtEvent);
// break;
case X11.EnterNotify:
ce = (XCrossingEvent)xEvent.readField("xcrossing");
swtEvent.x = ce.x;
swtEvent.y = ce.y;
notifyListeners(SWT.MouseEnter, swtEvent);
break;
case X11.LeaveNotify:
ce = (XCrossingEvent)xEvent.readField("xcrossing");
swtEvent.x = ce.x;
swtEvent.y = ce.y;
notifyListeners(SWT.MouseExit, swtEvent);
break;
default: