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

The InputEvent#getModifiersEx method doesn't work as expected

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Not an Issue
    • Affects Version/s: 7
    • Fix Version/s: 7
    • Component/s: client-libs
    • Labels:
      None
    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      The javadoc says:
      * For example, if the user presses <b>button 1</b> followed by
      * <b>button 2</b>, and then releases them in the same order,
      * the following sequence of events is generated:
      * <PRE>
      * <code>MOUSE_PRESSED</code>: <code>BUTTON1_DOWN_MASK</code>
      * <code>MOUSE_PRESSED</code>: <code>BUTTON1_DOWN_MASK | BUTTON2_DOWN_MASK</code>
      * <code>MOUSE_RELEASED</code>: <code>BUTTON2_DOWN_MASK</code>
      * <code>MOUSE_CLICKED</code>: <code>BUTTON2_DOWN_MASK</code>
      * <code>MOUSE_RELEASED</code>:
      * <code>MOUSE_CLICKED</code>:
      * </PRE>

      But if you run the attached test under Windows XP (on jdk1.6.0_24b07, jdk7 or jdk8) you'll get the following output:
      mousePressed
        BUTTON1_DOWN_MASK
      mousePressed
        BUTTON1_DOWN_MASK
      mouseReleased

      mouseClicked

      mouseReleased

      mouseClicked

      Therefore several steps (started from second mousePressed) are invalid

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              rupashka Pavel Porvatov (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: