- Message.Q.add(lastMoveMessage = new Message() { public void perform() {
- synchronized(Surface.this) {
-
- // if move messages are arriving faster than we can process them, we just start ignoring them
- if (lastMoveMessage != this) return;
-
- int oldmousex = mousex;
- int oldmousey = mousey;
- mousex = newmousex;
- mousey = newmousey;
-
- String oldcursor = cursor;
- cursor = "default";
-
- // Root gets motion events outside itself (if trapped, of course)
- if (!root.inside(oldmousex, oldmousey) && !root.inside(mousex, mousey) && (button1 || button2 || button3))
- root.put("Move", Boolean.TRUE);
-
- root.Move(oldmousex, oldmousey, mousex, mousey);
- if (!cursor.equals(oldcursor)) syncCursor();
- }
- }});