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

The InputEvent#getModifiersEx method doesn't work as expected

    XMLWordPrintable

Details

    • Bug
    • Resolution: Not an Issue
    • P2
    • 7
    • 7
    • client-libs
    • None
    • generic
    • 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

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

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: