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

[hidpi] The hotspot of the custom cursor isn't correct

    Details

    • Subcomponent:
    • CPU:
      x86
    • OS:
      other

      Description

      FULL PRODUCT VERSION :


      A DESCRIPTION OF THE PROBLEM :
      I use a custom cursor in my application with a width of 30 and height of 30.

      If I increase my DPI to 200% than my screen resolution is 192 dpi instead of 96.

      Java scales the image, but the hotspot will not be scaled.

      *) Hotspot defined at the left-bottom corner
      *) In case of 100% -> it's correct
      *) In case of 200% -> it looks like the hotspot was defined at the left-center



      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1.) Create an application which uses a custom cursor
      2.) Define the hotspot at the left-bottom corner
      3) Increase the display resolution from 100% to Extra Large -200%
      -> sign out before you test it again.
      4) the hotspot is not at the left-bottom corner but at the left-center

      myComponent.setCursor(Toolkit.getDefaultToolkit().createCustomCursor(image,
      new Point(0,30), "mycursor"))


      REPRODUCIBILITY :
      This bug can be reproduced always.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                serb Sergey Bylokhov
                Reporter:
                webbuggrp Webbug Group
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: