On Fri, 20 Jan 2023 23:17:01 GMT, Kevin Rushforth <[email protected]> wrote:
>> modules/javafx.graphics/src/main/native-glass/gtk/glass_dnd.cpp line 141:
>>
>>> 139: jobjectArray mimes;
>>> 140: gint dx, dy;
>>> 141: } enter_ctx = {NULL, FALSE, FALSE, NULL, 0, 0};
>>
>> it's funny how it's initialized here and also in reset_enter_ctx(), and just
>> by coincidence both produce the same result. This will break if initial
>> values are other than NULL, 0, FALSE.
>
> Indeed. During my review, before I looked more closely, I was all ready to
> post a comment to the effect that it was never set back to FALSE. Then I saw
> the `memset` in `reset_enter_ctx` that you referred to. Not the way I would
> have initially designed it -- relying on '0' being the desired default value
> for all fields (including pointers) -- but given that it is that way, this
> doesn't make the problem any worse.
I plan to gradually improve it.
-------------
PR: https://git.openjdk.org/jfx/pull/1005