Revision: 3940
          http://vexi.svn.sourceforge.net/vexi/?rev=3940&view=rev
Author:   clrg
Date:     2010-10-24 10:41:49 +0000 (Sun, 24 Oct 2010)

Log Message:
-----------
Add flag MOUSEINSIDE_BLOCKED so a parent with a descendent/child blocking Move 
will still have MOUSEINSIDE set and thus still be part of the propagateMove() 
recursion
- Fixes Enter/Leave firing when a shrunk parent contains a Move-blocking 
descendent/child

Modified Paths:
--------------
    branches/vexi3_old_build/core/org.vexi.core/src/org/vexi/core/Box.jpp

Modified: branches/vexi3_old_build/core/org.vexi.core/src/org/vexi/core/Box.jpp
===================================================================
--- branches/vexi3_old_build/core/org.vexi.core/src/org/vexi/core/Box.jpp       
2010-10-24 02:37:40 UTC (rev 3939)
+++ branches/vexi3_old_build/core/org.vexi.core/src/org/vexi/core/Box.jpp       
2010-10-24 10:41:49 UTC (rev 3940)
@@ -242,9 +242,9 @@
     private static final int SHRINK = HSHRINK | VSHRINK;
     
     private static final int TILE_IMAGE              = 0x00000010;
-    private static final int MOUSEINSIDE             = 0x00000020;
-    private static final int CURSOR                  = 0x00000040;
-    //private static final int UNUSED                = 0x00000080;
+    private static final int CURSOR                  = 0x00000020;
+    private static final int MOUSEINSIDE             = 0x00000040;
+    private static final int MOUSEINSIDE_BLOCKED     = 0x00000080;
 
     private static final int CONSTRAIN               = 0x00000100;
     private static final int CONSTRAIN_DESCENDENT    = 0x00000200;
@@ -1373,8 +1373,11 @@
         // they may throw an exception which would leave this box
         // in an inconsistent state (!mouse.inside but no Leave)
         clear(MOUSEINSIDE);
-        if (test(LEAVE_TRAP)) {
+        if (!test(MOUSEINSIDE_BLOCKED) && test(LEAVE_TRAP)) {
+            clear(MOUSEINSIDE_BLOCKED);
             justTriggerTraps(SC_Leave, JSU.T);
+        } else {
+            clear(MOUSEINSIDE_BLOCKED);
         }
     }
 
@@ -1429,14 +1432,17 @@
         // child prevented cascade during _Move/Move which blocks
         // Enter on this box - invoking Leave if necessary
         if (interrupted) {
-            if (test(MOUSEINSIDE)) {
-                clear(MOUSEINSIDE);
+            if (!test(MOUSEINSIDE_BLOCKED)) {
+                set(MOUSEINSIDE_BLOCKED);
+                set(MOUSEINSIDE);
                 if (test(LEAVE_TRAP)) {
                     justTriggerTraps(SC_Leave, JSU.T);
                 }
             }
             // propagate cascade prevention 
             return true;
+        } else {
+            clear(MOUSEINSIDE_BLOCKED);
         }
         
         // set cursor if applicable to this box
@@ -1559,7 +1565,7 @@
              * placed upon it will not be fired.</p> 
              * 
              * @type(Boolean) */
-            case "inside": return JSU.B(test(MOUSEINSIDE) && isVisible());
+            case "inside": return JSU.B(test(MOUSEINSIDE) && 
!test(MOUSEINSIDE_BLOCKED) && isVisible());
             
             /* <p><em>Read only</em></span> property representing the mouse's 
current x-position/y-position
              * relative to the owning box.</p>


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Vexi-svn mailing list
Vexi-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vexi-svn

Reply via email to