RFR: 8333919: [macOS] dragViewOffsetX/dragViewOffsetY are ignored for the dragView image [v4]

Andy Goryachev angorya at openjdk.org
Mon Aug 12 21:02:41 UTC 2024


On Mon, 12 Aug 2024 17:13:51 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.
>
> Lukasz Kostyra has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Merge two if image != nil statements together
>   
>   Those were unnecessarily split

Question: how should we handle the negative offsets?

The way javadoc is currently phrased, "offsetX x position of the cursor **over** the image" implies that the offset is clamped to be inside of the (scaled) image.  If so, the behavior appears to be correct even in the presence of infinities and NaNs (the latter produces 0 offset).

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

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


More information about the openjfx-dev mailing list