On Wed, 6 Jan 2021 16:20:47 GMT, Jose Pereda <jper...@openjdk.org> wrote:

> As commented in the JBS issue, there is one single `dndGesture` object in 
> `Scene`, that can be instantiated from three different ways: 
> 
> - DropTargetListener, on dragEnter 
> - DragGestureListener, on dragGestureRecognized or 
> - MouseHandler, processing a right mouse click (these two are mutually 
> exclusive).  
> 
> This PR prevents that, for two almost simultaneous drag events (for instance 
> via mouse and touchpad), the `dndGesture` for the last of these events gets 
> initialized again, losing all existing drag info (`dndGesture.dragboard`) 
> that was added to the first one, avoiding the RTE.
> 
> The existing manual test 
> [DndTest](https://github.com/openjdk/jfx/blob/master/tests/manual/dnd/DndTest.java)
>  has been used on MacOS to verify the PR.

Yes, it does seem to fix the exception. I'd like to take a closer look to make 
sure that it isn't just masking the problem. Also, a second reviewer could be 
helpful on this, even though it is a simple fix.

@arapte or @pankaj-bansal can one of you also look at it?

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

PR: https://git.openjdk.java.net/jfx/pull/372

Reply via email to