Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6200670

MouseMoved events are triggered by Choice when mouse is moved outside the component, XToolkit

XMLWordPrintable

    • b33
    • x86
    • linux_sun
    • Verified

      I have added a mouse listener and a mouse motion listener to a choice. I am clicking on the choice and the drop-down appears. Keeping the drop-down visible, I am noticing the following behaviors on XToolkit with respect to mouse events.

      1. When the drop-down is active, MouseEvents are triggered regardless of whether the mouse is inside the component or outside the component. You can test this by moving the mouse all over the screen. Clicking and dragging something on the native window (say console) triggers MousePressed, MouseDragged events for choice.

      2. There is a difference in behavior between Motif/Win32 and XToolkit. Mouse events are not triggered on Motif / Win32 when the mouse pointer enters the drop-down. But on XToolkit, mouse events are always triggered regardless of where the mouse pointer is.

      The above behaviors are noticed only on XToolkit, hence only since 1.5. Not reproducible on Win32 and Motif.

      I have attached a sample test. Execute it on XToolkit. A frame with a choice would appear. Click on the Choice and drop-down will be shown. Now move the mouse all over the screen. You will see MouseMoved events being triggered for Choice. Now keeping the drop-down active, click on some native apps and drag the mouse. You will see all sorts of mouse events being triggered by Choice for an interaction that is not relevant to the component.

            dav Andrei Dmitriev (Inactive)
            pmohansunw Praveen Mohan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: