Full press-drag-release done event

Kevin Rushforth kevin.rushforth at oracle.com
Mon Aug 18 12:32:14 UTC 2025


Seems reasonable to me, too.

-- Kevin

On 8/18/2025 2:36 AM, John Hendrikx wrote:
>
> 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.hendrikx at 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
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/openjfx-dev/attachments/20250818/1ce586fd/attachment-0001.htm>


More information about the openjfx-dev mailing list