From a45a8fc2ca7e197f70a1e13ae22d2a49339722f8 Mon Sep 17 00:00:00 2001 From: david Date: Sun, 4 Apr 2004 12:06:45 +0000 Subject: [PATCH] minimise move events darcs-hash:20040404120645-ac46f-91202f7f24764e604ab7b9daddbefa6fc959a5ed.gz --- src/org/ibex/Surface.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/org/ibex/Surface.java b/src/org/ibex/Surface.java index b553056..e68c392 100644 --- a/src/org/ibex/Surface.java +++ b/src/org/ibex/Surface.java @@ -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(); -- 1.7.10.4