Revision: 3185
http://vexi.svn.sourceforge.net/vexi/?rev=3185&view=rev
Author: clrg
Date: 2008-11-08 14:33:17 +0000 (Sat, 08 Nov 2008)
Log Message:
-----------
Fix a bug with _Move/Move interfering with each other
Modified Paths:
--------------
trunk/core/org.vexi.core/src/org/vexi/core/Box.jpp
trunk/core/org.vexi.core/src_junit/test/core/box/events/TestBoxEvents.java
Modified: trunk/core/org.vexi.core/src/org/vexi/core/Box.jpp
===================================================================
--- trunk/core/org.vexi.core/src/org/vexi/core/Box.jpp 2008-11-07 16:02:57 UTC
(rev 3184)
+++ trunk/core/org.vexi.core/src/org/vexi/core/Box.jpp 2008-11-08 14:33:17 UTC
(rev 3185)
@@ -162,10 +162,10 @@
//private static final int UNUSED = 0x0--00000;
- private static final int MOVE_TRAP = 0x10000000;
- private static final int ENTER_TRAP = 0x20000000;
- private static final int LEAVE_TRAP = 0x40000000;
- //private static final int UNUSED = 0x80000000;
+ private static final int ENTER_TRAP = 0x10000000;
+ private static final int LEAVE_TRAP = 0x20000000;
+ private static final int _MOVE_TRAP = 0x40000000;
+ private static final int MOVE_TRAP = 0x80000000;
private static final short MINWIDTH_TRAP = 0x0010;
private static final short MINHEIGHT_TRAP = 0x0020;
@@ -387,7 +387,7 @@
try {
tryPropagateMove(s.mousex, s.mousey);
} catch (JSExn e) {
- Log.uWarn(Box.class,"Caught JS Exception while invoking
tryPropogateMove");
+ Log.uWarn(Box.class,"Caught JS Exception while invoking
tryPropagateMove");
Log.uWarn(Box.class,e);
}
}
@@ -989,14 +989,13 @@
// Event Handling /////////////////////////////////////////////////
- /** notification of a move event - should only ever be invoked by surface
*/
+ /** initiate a move event - should only ever be invoked by surface or
sendEvent */
protected void tryPropagateMove(int mx, int my) throws JSExn {
if (inside(mx, my)) propagateMove(mx, my);
else {
if (test(MOUSEINSIDE)) propagateLeave();
- if (test(MOVE_TRAP))
- if (Interpreter.CASCADE_PREVENTED !=
justTriggerTraps(SC__Move, JSU.T))
- justTriggerTraps(SC_Move, JSU.T);
+ if (!test(_MOVE_TRAP) || (Interpreter.CASCADE_PREVENTED !=
justTriggerTraps(SC__Move, JSU.T)))
+ if (test(MOVE_TRAP)) justTriggerTraps(SC_Move, JSU.T);
}
}
@@ -1019,7 +1018,7 @@
* - that is, child interruption has no effect on it's parent
**/
private final boolean propagateMove(int mousex, int mousey) throws JSExn {
- if (test(MOVE_TRAP))
+ if (test(_MOVE_TRAP))
if (Interpreter.CASCADE_PREVENTED == justTriggerTraps(SC__Move,
JSU.T))
return true;
@@ -1516,7 +1515,7 @@
case "visible": set(VISIBLE_TRAP);
case "Enter": set(ENTER_TRAP);
case "Leave": set(LEAVE_TRAP);
- case "_Move": set(MOVE_TRAP);
+ case "_Move": set(_MOVE_TRAP);
case "Move": set(MOVE_TRAP);
case "fontsize":
if (text == Text.DEFAULT_TEXT) text = new Text();
@@ -1553,7 +1552,7 @@
case "visible": if (wtrap(SC_visible) == null) clear(VISIBLE_TRAP);
case "Enter": if (wtrap(SC_Enter) == null) clear(ENTER_TRAP);
case "Leave": if (wtrap(SC_Leave) == null) clear(LEAVE_TRAP);
- case "_Move": if (wtrap(SC__Move) == null) clear(MOVE_TRAP);
+ case "_Move": if (wtrap(SC__Move) == null) clear(_MOVE_TRAP);
case "Move": if (wtrap(SC_Move) == null) clear(MOVE_TRAP);
case "fontsize": if (wtrap(SC_fontsize) == null) text.fontsize_trap =
false;
case "font": if (wtrap(SC_font) == null) text.font_trap = false;
Modified:
trunk/core/org.vexi.core/src_junit/test/core/box/events/TestBoxEvents.java
===================================================================
--- trunk/core/org.vexi.core/src_junit/test/core/box/events/TestBoxEvents.java
2008-11-07 16:02:57 UTC (rev 3184)
+++ trunk/core/org.vexi.core/src_junit/test/core/box/events/TestBoxEvents.java
2008-11-08 14:33:17 UTC (rev 3185)
@@ -26,7 +26,7 @@
public static void main(String[] args) throws Throwable {
CoreTestSuite cts = new TestBoxEvents();
- TestCase t = cts.createTestCase(cts.getResourceDirs(), "contentx.t");
+ TestCase t = cts.createTestCase(cts.getResourceDirs(), "simpleMove.t");
t.runBare();
}
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Vexi-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/vexi-svn