<AWT Dev> [12]RFR: JDK-8215921: There is no change when select different Foreground and Background by mouse.

krishna.addepalli at oracle.com krishna.addepalli at oracle.com
Fri Jan 18 12:08:11 UTC 2019


Hi Sergey, Phil,

I have tested the new test case in Windows, Mac, Linux, and found that it runs on all 3 platforms without any problems.
I have also tested all the regressions that were raised, and all of them passed. In addition, I ran all the awt/Choice jtreg tests, and found no new failures.

Thanks,
Krishna

From: <> Krishna Addepalli 
Sent: Thursday, January 17, 2019 8:34 PM
To: Sergey Bylokhov <sergey.bylokhov at oracle.com>
Cc: awt-dev at openjdk.java.net
Subject: Re: <AWT Dev> [12]RFR: JDK-8215921: There is no change when select different Foreground and Background by mouse.
 
Hi Sergey,
 
The test case was leading my reasoning astray! Yes you are right that we post event even for the same item selected again.
I have updated the fix and the test case well, which checks if an ItemEvent is generated when a new item is selected and then it is not generated when the same item is selected again.
Here is the updated webrev: http://cr.openjdk.java.net/~kaddepalli/8215921/webrev02 <http://cr.openjdk.java.net/~kaddepalli/8215921/webrev02>
 
Thanks,
Krishna


On 17-Jan-2019, at 1:30 AM, Sergey Bylokhov <Sergey.Bylokhov at oracle.com <mailto:Sergey.Bylokhov at oracle.com>> wrote:
 

On 16/01/2019 09:59, Krishna Addepalli wrote:

Hi Sergey,
I checked the code, by putting logs and can confirm that an event is not generated even if the same is reselected.
I have updated the test case to reflect this fact, so here is the new webrev: http://cr.openjdk.java.net/~kaddepalli/8215921/webrev01/ <http://cr.openjdk.java.net/~kaddepalli/8215921/webrev01/>

But why it is not generated? How (!firstPress || wasDragged ) prevents it to be posted?
From the code it looks like when "wasDragged==true" or "firstPress==false" we will post an event.


-- 
Best regards, Sergey.
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/awt-dev/attachments/20190118/01d42cda/attachment-0001.html>


More information about the awt-dev mailing list