minimise move events
authordavid <david@zentus.com>
Sun, 4 Apr 2004 12:06:45 +0000 (12:06 +0000)
committerdavid <david@zentus.com>
Sun, 4 Apr 2004 12:06:45 +0000 (12:06 +0000)
darcs-hash:20040404120645-ac46f-91202f7f24764e604ab7b9daddbefa6fc959a5ed.gz

src/org/ibex/Surface.java

index b553056..e68c392 100644 (file)
@@ -132,8 +132,8 @@ public abstract class Surface extends PixelBuffer implements Scheduler.Task {
                 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))
+                // FIXME: Root (ONLY) gets motion events outside itself (if trapped)
+                if (oldmousex != mousex || oldmousey != mousey)
                     root.putAndTriggerTrapsAndCatchExceptions("_Move", T);
                 if (!cursor.equals(oldcursor)) syncCursor();
             } };
@@ -250,10 +250,10 @@ public abstract class Surface extends PixelBuffer implements Scheduler.Task {
             root.resize(root.x, root.y, root.maxwidth, root.maxheight);
             root.place_children();
             setSize(root.width, root.height);
-            String oldcursor = cursor;
+            /*String oldcursor = cursor;
             cursor = "default";
             root.putAndTriggerTrapsAndCatchExceptions("_Move", JS.T);
-            if (!cursor.equals(oldcursor)) syncCursor();
+            if (!cursor.equals(oldcursor)) syncCursor();*/
         } while(abort);
 
         int[][] dirt = dirtyRegions.flush();