On Mon, 24 Jul 2023 17:55:49 GMT, Alexey Ivanov <aiva...@openjdk.org> wrote:
> If the user moves the mouse when Robot generates mouse events, it is expected > to produce erroneous results because the mouse ends up in the wrong position > when Robot issues further events — essentially it breaks the assumptions in > the test. Correct in case of Robot's mouse events + simultaneous manual/user mouse movement it leads to wrong position which causes tests to fail. But the case being fixed here consists of Robot keyEvents (NOT Robot's mouseEvents) + simultaneous manual/user mouse movement. > So, we should check whether the internal flags passed to the generated events > remain valid. But it could be not as easy to verify as in this case. > > Are mouse events affected if the user types text on the keyboard while Robot > is moving the mouse? It's a mirrored scenario to the one described in the > bug. The position of mouse remains intact, yet flags may change by concurrent > keyboard input. I see your point. I think based on what @mrserb and you have discussed, I see 3 cases here 1. Robot mouse events + external manual mouse move- In this case user mouse events will cause the mouse to be at wrong position thus causing erroneous result as expected. And this is not a valid use case. 2. Robot key events + external manual mouse move - This is the case being fixed for accessibility keyboard use case. 3. Robot mouse events + external manual key events - As you mentioned this is a mirrored scenario and based on initial testing it works as expected - tested by automating mouse moves with Robot (without clicks or drag) and external key presses. I'll have to check the flag state in this case - at the starting of the test and at the end. ------------- PR Comment: https://git.openjdk.org/jdk/pull/14744#issuecomment-1648437392