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

Robot.mouseMove doesn't clamp bounds on macOS when trying to move mouse off screen

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • 25
    • 8, 11, 17, 24
    • client-libs
    • generic
    • os_x

      Currently on macOS when mouseMove is given an offscreen coordinate to move the mouse to, mouseMove will physically clamp to the edge of the screen, but if you try to grab the mouse location immediately after by using MouseInfo.getPointerInfo().getLocation() you will get the value of the offscreen point.

      mouseMove should be updated to match other platforms and handle arguments beyond the maximum screen bounds by clamping the coordinates to their maximum values to prevent junk coordinates from being used in calculations.

            achung Alisen Chung
            achung Alisen Chung
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: