<AWT Dev> [10] JDK-8146537: TrayIcon Action Listener doesnt work in WIndows 10

Semyon Sadetsky semyon.sadetsky at oracle.com
Tue Dec 5 16:17:25 UTC 2017


Hi Shashi,

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?

--Semyon

On 12/04/2017 09:30 AM, shashidhara veerabhadraiah wrote:
> Hi Semyon, Thank for your review.
>
> 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.
>
> SendActionEvent() takes on the GetActionModifiers() which is kept as it.
>
> Hope I answer your question. Have a good day Semyon.
>
> Thanks and regards,
> Shashi
>
>> On 04-Dec-2017, at 9:45 PM, Semyon Sadetsky <semyon.sadetsky at oracle.com> wrote:
>>
>> Hi Shashi,
>>
>> Shouldn't the BUTTON1_DOWN_MASK be added to the modifiers of the action?
>>
>> --Semyon
>>
>> On 11/27/2017 09:16 PM, Shashidhara Veerabhadraiah wrote:
>>> Hi Sergey, Here is the Webrev containing fixes for your comments.
>>>
>>> http://cr.openjdk.java.net/~sveerabhadra/8146537/webrev.01/
>>>
>>> Thanks and regards,
>>> Shashi
>>>
>>> -----Original Message-----
>>> From: Sergey Bylokhov
>>> Sent: Wednesday, November 22, 2017 4:31 AM
>>> To: Shashidhara Veerabhadraiah <shashidhara.veerabhadraiah at oracle.com>; awt-dev at openjdk.java.net
>>> Subject: Re: [10] JDK-8146537: TrayIcon Action Listener doesnt work in WIndows 10
>>>
>>> Hi, Shashi.
>>> On 20/11/2017 02:10, Shashidhara Veerabhadraiah wrote:
>>>> Summary: The windows GetKeyState() api provides the key state of the
>>>> requested key as of that instant by sampling the current thread's key
>>>> messages from the message queue. Any misses either a thread ran faster
>>>> or slower it is possible to miss the key messages. This is the problem
>>>> that's happening under windows 10 wherein the key states are being
>>>> null for the mouse button press. This problem is mentioned in the msdn
>>>> as well. On the other hand, a tray icon message click produces
>>>> NIN_BALLOONUSERCLICK event only upon the left mouse button click and
>>>> hence there is no check required for the same.
>>> 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?
>>>
>>> Another unclear thing is that we use
>>> java_awt_event_InputEvent_BUTTON1_DOWN_MASK which is a mask for InputEvent as modifier for ActionEvent which does not have such mask.
>>>
>>> --
>>> Best regards, Sergey.



More information about the awt-dev mailing list