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

When both mouse buttons are pressed, MouseEvent.isPrimaryButtonDown() returns false on Mac

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • fx2.1
    • fx2.0.2
    • javafx

      Pressing both mouse buttons triggers two MOUSE_PRESSED events.

      On Windows the second MOUSE_PRESSED has primaryButtonDown + secondaryButtonDown flags set.

      MouseEvent [source = GlassPane[id=glassPane], target = GlassPane[id=glassPane], eventType = MOUSE_PRESSED, consumed = false, x = 302.0, y = 205.0, button = PRIMARY, primaryButtonDown]
      MouseEvent [source = GlassPane[id=glassPane], target = GlassPane[id=glassPane], eventType = MOUSE_PRESSED, consumed = false, x = 302.0, y = 205.0, button = SECONDARY, primaryButtonDown, secondaryButtonDown]

      On Mac, the second MOUSE_PRESSED has secondaryButtonDown flag only.

      MouseEvent [source = GlassPane[id=glassPane], target = GlassPane[id=glassPane], eventType = MOUSE_PRESSED, consumed = false, x = 358.0, y = 174.0, button = PRIMARY, primaryButtonDown]
      MouseEvent [source = GlassPane[id=glassPane], target = GlassPane[id=glassPane], eventType = MOUSE_PRESSED, consumed = false, x = 358.0, y = 174.0, button = SECONDARY, secondaryButtonDown]

      This is a bug on Mac : primaryButtonDown flag should be present since both buttons are down.

      I use the following SDK build:

      $ more timestamp
      Product: javafx-2.0.2beta
      Platform: macosx-universal
      Build-Number: 34
      Build-ID: 2011-10-25_17-41-55

            anthony Anthony Petrov (Inactive)
            eleponn Eric Le Ponner
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: