RFR: 8275033: Drag and drop a file produces NullPointerException Cannot read field "dragboard"
Andy Goryachev
angorya at openjdk.org
Fri Jan 20 20:40:52 UTC 2023
On Thu, 19 Jan 2023 16:16:18 GMT, Thiago Milczarek Sayao <tsayao at openjdk.org> wrote:
> When running on Wayland the `GDK_DRAG_LEAVE` is sent just after `GDK_DROP_START`. The leave event causes java to set `dragGesture` to `null`. On Xorg this event is not sent.
>
> The fix just ignores the leave event if a drop occurred.
Tested with FxDock on Xorg - no ill effects.
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.
-------------
Marked as reviewed by angorya (Committer).
PR: https://git.openjdk.org/jfx/pull/1005
More information about the openjfx-dev
mailing list