<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:PMingLiU;
panose-1:2 1 6 1 0 1 1 1 1 1;}
@font-face
{font-family:Mangal;
panose-1:0 0 4 0 0 0 0 0 0 0;}
@font-face
{font-family:Tunga;
panose-1:0 0 4 0 0 0 0 0 0 0;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"\@PMingLiU";}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman",serif;
color:black;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";
color:black;}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:"Consolas",serif;
color:black;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body bgcolor=white lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Hi Semyon, Thanks for your review.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Even I had got mixed up between them initially</span><span style='font-size:11.0pt;font-family:Wingdings;color:#1F497D'>J</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Thank you Sergey for your initial review.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Have a nice day.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Thanks and regards,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Shashi<o:p></o:p></span></p><p class=MsoNormal><a name="_MailEndCompose"><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></a></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext'>From:</span></b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext'> Semyon Sadetsky <br><b>Sent:</b> Friday, December 8, 2017 9:20 PM<br><b>To:</b> shashidhara veerabhadraiah <shashidhara.veerabhadraiah@oracle.com><br><b>Cc:</b> awt-dev@openjdk.java.net<br><b>Subject:</b> Re: <AWT Dev> [10] JDK-8146537: TrayIcon Action Listener doesnt work in WIndows 10<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><pre>Hi Shashi,<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>I mixed up GetActionModifiers and GetJavaModifiers. GetActionModifiers shouldn't contain mouse button mask.<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>The fix looks good. <o:p></o:p></pre><pre><o:p> </o:p></pre><pre>--Semyon<o:p></o:p></pre><div><p class=MsoNormal>On 12/6/17 10:57 AM, shashidhara veerabhadraiah wrote: <o:p></o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><pre>Hi Semyon, Sure I understand your concern.<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>Will update web rev on this and get back to you soon.<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>Thanks and regards,<o:p></o:p></pre><pre>Shashi<o:p></o:p></pre><pre><o:p> </o:p></pre><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><pre>On 07-Dec-2017, at 12:12 AM, Semyon Sadetsky <a href="mailto:semyon.sadetsky@oracle.com"><semyon.sadetsky@oracle.com></a> wrote:<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>Hi Shashi,<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>On 12/05/2017 08:13 PM, Shashidhara Veerabhadraiah wrote:<o:p></o:p></pre><pre><o:p> </o:p></pre><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><pre>Hi Semyon, the mouse key state is already part of the input to the function via the flags variable(if there is any) and same message is already sent to the action event where<o:p></o:p></pre></blockquote><pre>The flags parameter doesn't contain any modifiers because it is always equals to zero.<o:p></o:p></pre><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><pre>they only save the message. This part is kept same as earlier.<o:p></o:p></pre></blockquote><pre>The action event receives modifiers from the 3rd parameter of the SendMouseEvent function which now may not contain any mouse modifiers, if I correctly understand the root cause of the issue. My question is about compatibility. If this code whenever have been working (for example, in Windows 7) the BUTTON1_DOWN_MASK have been always set in the action event. After your fix it may not be set (or even will never be set anymore). Does it affect old applications which might expect a button presence in the action?<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>--Semyon<o:p></o:p></pre><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><pre><o:p> </o:p></pre><pre>shashi<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>-----Original Message-----<o:p></o:p></pre><pre>From: Semyon Sadetsky<o:p></o:p></pre><pre>Sent: Tuesday, December 5, 2017 9:47 PM<o:p></o:p></pre><pre>To: shashidhara veerabhadraiah <a href="mailto:shashidhara.veerabhadraiah@oracle.com"><shashidhara.veerabhadraiah@oracle.com></a><o:p></o:p></pre><pre>Cc: <a href="mailto:awt-dev@openjdk.java.net">awt-dev@openjdk.java.net</a><o:p></o:p></pre><pre>Subject: Re: <AWT Dev> [10] JDK-8146537: TrayIcon Action Listener doesnt work in WIndows 10<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>Hi Shashi,<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>I meant, since before the modifier has been sent with the action it should be sent now as well for compatibility. Or this code has never worked?<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>--Semyon<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>On 12/04/2017 09:30 AM, shashidhara veerabhadraiah wrote:<o:p></o:p></pre><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><pre>Hi Semyon, Thank for your review.<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>BUTTON1_DOWN_MASK upon the GetJavaModifiers() provide if the left mouse button virtual key is pressed or not. Currently we are unable to capture left button click state using the ::GetKeyState(). The event NIN_BALLONUSERCLICK is generated only upon the left mouse click and any other action does not raise this event. Hence there is no need to check it once again.<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>SendActionEvent() takes on the GetActionModifiers() which is kept as it.<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>Hope I answer your question. Have a good day Semyon.<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>Thanks and regards,<o:p></o:p></pre><pre>Shashi<o:p></o:p></pre><pre><o:p> </o:p></pre><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><pre>On 04-Dec-2017, at 9:45 PM, Semyon Sadetsky <a href="mailto:semyon.sadetsky@oracle.com"><semyon.sadetsky@oracle.com></a> wrote:<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>Hi Shashi,<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>Shouldn't the BUTTON1_DOWN_MASK be added to the modifiers of the action?<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>--Semyon<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>On 11/27/2017 09:16 PM, Shashidhara Veerabhadraiah wrote:<o:p></o:p></pre><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><pre>Hi Sergey, Here is the Webrev containing fixes for your comments.<o:p></o:p></pre><pre><o:p> </o:p></pre><pre><a href="http://cr.openjdk.java.net/~sveerabhadra/8146537/webrev.01/">http://cr.openjdk.java.net/~sveerabhadra/8146537/webrev.01/</a><o:p></o:p></pre><pre><o:p> </o:p></pre><pre>Thanks and regards,<o:p></o:p></pre><pre>Shashi<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>-----Original Message-----<o:p></o:p></pre><pre>From: Sergey Bylokhov<o:p></o:p></pre><pre>Sent: Wednesday, November 22, 2017 4:31 AM<o:p></o:p></pre><pre>To: Shashidhara Veerabhadraiah<o:p></o:p></pre><pre><a href="mailto:shashidhara.veerabhadraiah@oracle.com"><shashidhara.veerabhadraiah@oracle.com></a>; <a href="mailto:awt-dev@openjdk.java.net">awt-dev@openjdk.java.net</a><o:p></o:p></pre><pre>Subject: Re: [10] JDK-8146537: TrayIcon Action Listener doesnt work<o:p></o:p></pre><pre>in WIndows 10<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>Hi, Shashi.<o:p></o:p></pre><pre>On 20/11/2017 02:10, Shashidhara Veerabhadraiah wrote:<o:p></o:p></pre><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><pre>Summary: The windows GetKeyState() api provides the key state of<o:p></o:p></pre><pre>the requested key as of that instant by sampling the current<o:p></o:p></pre><pre>thread's key messages from the message queue. Any misses either a<o:p></o:p></pre><pre>thread ran faster or slower it is possible to miss the key<o:p></o:p></pre><pre>messages. This is the problem that's happening under windows 10<o:p></o:p></pre><pre>wherein the key states are being null for the mouse button press.<o:p></o:p></pre><pre>This problem is mentioned in the msdn as well. On the other hand, a<o:p></o:p></pre><pre>tray icon message click produces NIN_BALLOONUSERCLICK event only<o:p></o:p></pre><pre>upon the left mouse button click and hence there is no check required for the same.<o:p></o:p></pre></blockquote><pre>The old code also request the state of the different keys like shift, control, etc. And after the fix we lose this information, probably we should apply it on top of the modifiers?<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>Another unclear thing is that we use<o:p></o:p></pre><pre>java_awt_event_InputEvent_BUTTON1_DOWN_MASK which is a mask for InputEvent as modifier for ActionEvent which does not have such mask.<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>--<o:p></o:p></pre><pre>Best regards, Sergey.<o:p></o:p></pre></blockquote></blockquote></blockquote></blockquote><pre><o:p> </o:p></pre></blockquote><pre><o:p> </o:p></pre></blockquote></div></body></html>