Revision: 1884 http://svn.sourceforge.net/vexi/?rev=1884&view=rev Author: clrg Date: 2007-06-27 11:37:07 -0700 (Wed, 27 Jun 2007)
Log Message: ----------- Fix regression with mouse.inside not working Modified Paths: -------------- core/trunk/org.vexi.core/src/org/vexi/core/Box.jpp Modified: core/trunk/org.vexi.core/src/org/vexi/core/Box.jpp =================================================================== --- core/trunk/org.vexi.core/src/org/vexi/core/Box.jpp 2007-06-27 18:35:47 UTC (rev 1883) +++ core/trunk/org.vexi.core/src/org/vexi/core/Box.jpp 2007-06-27 18:37:07 UTC (rev 1884) @@ -900,23 +900,26 @@ protected void moveEvent(int mx, int my) { if (inside(mx, my)) { if (propagateMoveAndEnter(mx, my)) - propagateLeave(); + propagateLeave(mx, my); } else { if (test(MOVE_TRAP)) { - if (Interpreter.CASCADE_PREVENTED == justTriggerTrapsAndCatchExceptions(SC__Move, JSU.T)) - if (Interpreter.CASCADE_PREVENTED == justTriggerTrapsAndCatchExceptions(SC_Move, JSU.T)) - propagateLeave(); - } else propagateLeave(); + if (Interpreter.CASCADE_PREVENTED != justTriggerTrapsAndCatchExceptions(SC__Move, JSU.T)) + return; + if (Interpreter.CASCADE_PREVENTED != justTriggerTrapsAndCatchExceptions(SC_Move, JSU.T)) + return; + } + propagateLeave(mx, my); } } /** clear flag MOUSEINSIDE on self and descendents and fire Leave traps */ - private final void propagateLeave() { - clear(MOUSEINSIDE); + private final void propagateLeave(int mousex, int mousey) { + if (!inside(mousex, mousey)) clear(MOUSEINSIDE); int i = treeSize()-1; for (Box b = getChild(i); b != null; b = getChild(--i)) - if (b.test(MOUSEINSIDE)) b.propagateLeave(); - if (test(LEAVE_TRAP)) + if (b.test(MOUSEINSIDE)) + b.propagateLeave(mousex - getXInParent(), mousey - getYInParent()); + if (!test(MOUSEINSIDE) && test(LEAVE_TRAP)) justTriggerTrapsAndCatchExceptions(SC_Leave, JSU.T); } 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 DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Vexi-svn mailing list Vexi-svn@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/vexi-svn