I think there was/is more: when the drop happens outside of any accepting node, 
the drag image scuttles back to the original place, with no way to disable that 
behavior.

This made the DnD unsuitable for me in the context of a docking framework, 
where the user expects a new window to be created with the dragged content.

Also, it is impossible to control the scaling of the drag image, for instance, 
to disable the scaling altogether.

-andy

From: openjfx-dev <openjfx-dev-r...@openjdk.org> on behalf of John Hendrikx 
<john.hendr...@gmail.com>
Date: Monday, August 18, 2025 at 02:37
To: Nir Lisker <nlis...@gmail.com>
Cc: openjfx-dev@openjdk.org <openjfx-dev@openjdk.org>
Subject: Re: Full press-drag-release done event


Yeah, that sounds reasonable, showing the source of the drag is quite useful I 
would think, and you can only do that if you can unhighlight it at the right 
time.

--John

On 18/08/2025 09:13, Nir Lisker wrote:
(Replying to the mailing list this time :) )

I have nodes that need to be dragged onto other nodes (in the same application) 
and are highlighted for the full drag-press-release duration, with an 
additional state change about the "selected" node. If they are dropped on a 
target that can accept them, the cleanup can be done when the drop is done, but 
if they are dropped outside of the application or on a node that can't accept 
them, the process never finishes. There are workarounds, but DnD shows that it 
can be much easier to do with the additional event.

On Sun, Aug 17, 2025 at 8:56 PM John Hendrikx 
<john.hendr...@gmail.com<mailto:john.hendr...@gmail.com>> wrote:
Seems harmless enough. What is your use case?

On 16/08/2025 01:53, Nir Lisker wrote:
> Hi all,
>
> I've noticed that the full press-drag-release MouseDragEvent doesn't
> have an event type that signals the end of the drag process. In DnD,
> there is DragEvent.DRAG_DONE that signals the end of the drag-and-drop
> process regardless of the result and the mouse location it was
> released at, including outside of the application.
>
> Adding a MouseDragEvent.MOUSE_DRAG_DONE is useful for applications
> that want to act when the process finishes regardless of the result.
> Currently, the "latest" event that can be delivered is a
> MOUSE_DRAG_RELEASED type, but it can only be delivered if the event
> ends on a node that registered for it. If the mouse is released
> outside of the application or on a node that hasn't registered for it,
> there will be no notification that the drag chain ended.
>
> I propose adding this event type and the appropriate property on Scene
> and Node. The modification seems rather simple in my prototype.
>
> Thoughts?
>
> -- Nir

Reply via email to