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

Kevin Rushforth kcr at openjdk.org
Mon Aug 12 22:50:55 UTC 2024


On Mon, 12 Aug 2024 21:58:51 GMT, Andy Goryachev <angorya at openjdk.org> wrote:

>> 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?

That seems out of scope for this PR. We typically don't do any special processing to deal with NaN unless there is a problem. If needed, maybe it could be done as part of the follow-up bug [JDK-8338204](https://bugs.openjdk.org/browse/JDK-8338204).

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

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


More information about the openjfx-dev mailing list