RFR: 8333919: dragViewOffsetX/dragViewOffsetY are ignored for the dragView image

Lukasz Kostyra lkostyra at openjdk.org
Thu Aug 8 12:42:07 UTC 2024


On Thu, 8 Aug 2024 12:35:59 GMT, Lukasz Kostyra <lkostyra at openjdk.org> wrote:

> When fixing [JDK-8233955](https://bugs.openjdk.org/browse/JDK-8233955) offset calculation was left out, which made Dragboard offset API not work on macOS.
> 
> This change fixes this mistake. Now drag image should be properly offset.

I have one more question to this, as I don't have the best way to test this. I'm not sure how offsets should be interpreted and if they are interpreted the right way.

At this point:
* For X offset: positive values shift image RIGHT (mouse cursor is closer to the LEFT side of drag image), negative shift LEFT (mouse cursor is closer to the RIGHT side of drag image)
* For Y offset: positive values shift image DOWN (mouse cursor is closer to the TOP of the drag image), negative values shift UP (mouse cursor is closer to the BOTTOM of the drag image)

Let me know if this behavior is desired and if it matches pre-[JDK-8233955](https://bugs.openjdk.org/browse/JDK-8233955) behavior.

-------------

PR Comment: https://git.openjdk.org/jfx/pull/1532#issuecomment-2275721478


More information about the openjfx-dev mailing list