RFR: JDK-8340978 : Open source few DnD tests - Set6 [v2]

Harshitha Onkar honkar at openjdk.org
Fri Oct 4 19:57:03 UTC 2024


On Fri, 4 Oct 2024 17:30:48 GMT, Phil Race <prr at openjdk.org> wrote:

>> Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   deleted MyMouseDragGestureRecognizer subclass
>
> test/jdk/java/awt/dnd/DnDAcceptanceTest/MyMouseDragGestureRecognizer.java line 25:
> 
>> 23: 
>> 24: /* Due to 2 AWT bugs:
>> 25:  * 4117525  mouseDragged events on Win32 do not set BUTTON1_MASK correctly
> 
> These bugs were fixed 20 years ago. Is this sub-class still necessary ?

`MyMouseDragGestureRecognizer` was being used in DnDSource.java.

> Is this sub-class still necessary ?

Sub-class is not necessary since there is a better approach - [Toolkit.getDefaultToolkit().createDragGestureRecognizer()](https://docs.oracle.com/en/java/javase/23/docs/api/java.desktop/java/awt/dnd/MouseDragGestureRecognizer.html) 
I have update DnDSource to use it instead of `MyMouseDragGestureRecognizer` and deleted the subclass.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21342#discussion_r1788248867


More information about the client-libs-dev mailing list