On Wed, 15 Sep 2021 04:18:11 GMT, Sergey Bylokhov <[email protected]> wrote:

> I have a general question about this bug, initially the test was added for 
> https://bugs.openjdk.java.net/browse/JDK-6479820 and that bug was fixed 
> because of this:
> 
> ```
> When resizing the window by dragging a corner with the mouse,
> the panel receives entry/exit mouse events randomly.
> These events should not occur because the mouse is not entering
> or exiting the window, it is dragging a corner of its border.
> ```
> 
> And in the current bug description:
> 
> `The window resizing is a bit slower than mouse movement. So before the 
> window resize can catch up to the mouse, the mouse exits the window, then 
> re-enters when the window catches up to it. This can be verified if you 
> resize the window at the edge without entering the window: there will be no 
> mouseEntered or mouseExit events. `
> 
> So situation is different, if the mouse is moved faster than window is 
> moving, then I do not see why we should not post an events. Especially if the 
> native system did that.

In the original bug report, I believe the root cause of the bug is the same 
based on the comment in JBS:
`So far this happens when system is not fast enough to resize native component 
in a short period of time while message is on its way.`

And I tried to keep the same idea for the fix in windows:
`The idea of the fix would be to pick up AwtWindow.m_resizing value and not 
consider any messages in PreProcessMouseMsg until m_resizing is true.`

So I guess the question is whether or not we should be posting these events in 
the first place during resizing? I still see the original bug fix in the 
windows files so I believe there currently is a mismatch in behavior across 
platforms.

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

PR: https://git.openjdk.java.net/jdk/pull/5497

Reply via email to