Comment #4 on issue 30 by allain.lalonde: Extra mouse movement events fired  
on mouse exit
http://code.google.com/p/piccolo2d/issues/detail?id=30

Given the following code, the bug doesn't seem to happen:

public class Issue30Example extends PFrame {

     public Issue30Example() {
         this(null);
     }

     public Issue30Example(PCanvas aCanvas) {
         super("Issue30Example", false, aCanvas);
     }

     public void initialize() {
         PLayer layer = getCanvas().getLayer();

         final PNode node = new PNode();
         node.setBounds(0, 0, 100, 100);
         node.setPaint(Color.RED);
         node.addInputEventListener(new PInputEventListener() {

             public void processEvent(PInputEvent aEvent, int type) {
                 // So that points directly on the edge don't round to be  
outside the bounds.
                 PBounds bounds = new PBounds(-0.0001, -0.0001, 100.0002,  
100.0002);
                 if (!bounds.contains(aEvent.getPosition())) {
                     switch (type) {
                         case MouseEvent.MOUSE_MOVED:
                             System.out.println("Moved");
                             break;
                         case MouseEvent.MOUSE_EXITED:
                             System.out.println("Exited");
                             break;
                         case MouseEvent.MOUSE_ENTERED:
                             System.out.println("Entered");
                             break;
                         default:
                             System.out.println(type);
                     }
                     System.out.println(type);
                     System.out.println("  " + aEvent);
                     if (aEvent.isMouseEvent()) {
                         System.out.println("   " + aEvent.getPosition());
                     }
                 }
             }
         });
         layer.addChild(node);
     }

     public static void main(String[] args) {
         new Issue30Example();
     }
}

Other than some double imprecision, I'm not seeing these "Delegate Events",  
has this issue been
fixed?

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to