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

[Windows] Custom cursor wrong size on 2nd screen if HiDPI scales are different

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • jfx11, jfx17, jfx21
    • javafx
    • None

      The primary screen has Windows scaling set to 100%, and the secondary screen is a HiDPI screen has Windows scaling set to 200%.

      Running the attached test from the main display, it shows initially a cursor 1.6 times bigger than the reference red rectangle (see display100.png).

      Moving the application to the secondary screen, while the best size didn't change, it shows a cursor 0.9 times the size of the rectangle (see display200.png).

      It seems there is a very similar AWT issue: https://bugs.openjdk.org/browse/JDK-8240568. As noted here as well, it doesn't happen with the built-in cursors, which scale up or down accordingly.

      It can be reproduced with any JavaFX version on Windows.

        1. cursor.png
          cursor.png
          0.4 kB
        2. CursorScaling.java
          1 kB
        3. display100.png
          display100.png
          91 kB
        4. display200.png
          display200.png
          164 kB

            kcr Kevin Rushforth
            jpereda Jose Pereda
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: