- public void perform() {
- if (mousex == newmousex && mousey == newmousey) return;
- int oldmousex = mousex; mousex = newmousex;
- int oldmousey = mousey; mousey = newmousey;
- String oldcursor = cursor; cursor = "default";
- // Root gets motion events outside itself (if trapped)
- if (!root.inside(oldmousex, oldmousey) && !root.inside(mousex, mousey) && (button1 || button2 || button3))
- root.putAndTriggerTrapsAndCatchExceptions("_Move", T);
- if (!cursor.equals(oldcursor)) syncCursor();
- }
+ private Scheduler.Task mover = new Scheduler.Task() {
+ public void perform() {
+ if (mousex == newmousex && mousey == newmousey) return;
+ int oldmousex = mousex; mousex = newmousex;
+ int oldmousey = mousey; mousey = newmousey;
+ String oldcursor = cursor; cursor = "default";
+ // Root gets motion events outside itself (if trapped)
+ if (!root.inside(oldmousex, oldmousey) && !root.inside(mousex, mousey) && (button1 || button2 || button3))
+ root.putAndTriggerTrapsAndCatchExceptions("_Move", T);
+ if (!cursor.equals(oldcursor)) syncCursor();
+ } };