On Thu, 21 Mar 2024 01:16:03 GMT, Harshitha Onkar <hon...@openjdk.org> wrote:

>> I think we should update the instructions.
>> 
>> A high resolution mouse produces events like this:
>> 
>> java.awt.event.MouseWheelEvent[MOUSE_WHEEL,(164,90),absolute(1135,365),button=0,clickCount=0,scrollType=WHEEL_UNIT_SCROLL,scrollAmount=3,wheelRotation=0,preciseWheelRotation=0.25]
>>  on panel0
>> java.awt.event.MouseWheelEvent[MOUSE_WHEEL,(164,90),absolute(1135,365),button=0,clickCount=0,scrollType=WHEEL_UNIT_SCROLL,scrollAmount=3,wheelRotation=0,preciseWheelRotation=0.25]
>>  on panel0
>> java.awt.event.MouseWheelEvent[MOUSE_WHEEL,(164,90),absolute(1135,365),button=0,clickCount=0,scrollType=WHEEL_UNIT_SCROLL,scrollAmount=3,wheelRotation=0,preciseWheelRotation=0.25]
>>  on panel0
>> java.awt.event.MouseWheelEvent[MOUSE_WHEEL,(133,46),absolute(1104,321),button=0,clickCount=0,scrollType=WHEEL_UNIT_SCROLL,scrollAmount=3,wheelRotation=1,preciseWheelRotation=1.0]
>>  on panel0
>> 
>> 
>> Thus, `wheelRotation=0` while `preciseWheelRotation=0.25`. When it reaches, 
>> `preciseWheelRotation=1.0`, the event contains **`wheelRotation=1`**.
>> 
>> A regular mouse with mouse-wheel notches produces the following events:
>> 
>> java.awt.event.MouseWheelEvent[MOUSE_WHEEL,(90,115),absolute(1061,390),button=0,clickCount=0,scrollType=WHEEL_UNIT_SCROLL,scrollAmount=3,wheelRotation=1,preciseWheelRotation=1.0]
>>  on panel0
>> java.awt.event.MouseWheelEvent[MOUSE_WHEEL,(176,76),absolute(1147,351),button=0,clickCount=0,scrollType=WHEEL_UNIT_SCROLL,scrollAmount=3,wheelRotation=1,preciseWheelRotation=1.0]
>>  on panel0
>> 
>> 
>> As you can see, `scrollType=WHEEL_UNIT_SCROLL` is the same in both cases. 
>> The only difference is that high-resolution mouse produces events where 
>> **`preciseWheelRotation < 1.0`**.
>> 
>> This means that you should also track the value of `preciseWheelRotation`. 
>> Otherwise, the test will pass when a regular mouse is used.
>> 
>> You may show a warning to the user if you detect, let's say, 5 events with 
>> `wheelRotation=1` but none of the events had `wheelRotation=0` and 
>> `preciseWheelRotation < 1.0`.
>
> @aivanov-jdk Since preciseWheelRotation amount depends on user's movement of 
> the high-res mouse and there might be a need to look through logs for few 
> events, it is better to convert this test from semi-automated to manual. Does 
> this sound good? 
> Updated the PR with the latest changes.

@honkar-jdk I think the test could still remain semi-automatic. Can the test 
verify the conditions? I see no reason why it can't… yet it requires more code. 
It can be postponed to a later time, if necessary.

I don't think we should make the tester read the log and verify the conditions 
which can be verified automatically.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18312#discussion_r1533668635

Reply via email to