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

Andy Goryachev angorya at openjdk.org
Mon Aug 12 22:03:39 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

modules/javafx.graphics/src/main/native-glass/mac/GlassViewDelegate.m line 1053:

> 1051:                 float imageH = [image size].height;
> 1052: 
> 1053:                 if (offset.x < 0.0f) {

I am puzzled a bit: a NaN input seem to produce NaN offsets, yet the testing shows that it behaves as if 0 offsets (possibly in the native code)?

Should the ifs be restructured so as not to pass NaN downstream?

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1532#discussion_r1714411657


More information about the openjfx-dev mailing list