Integrated: 8332158: [XWayland] test/jdk/java/awt/Mouse/EnterExitEvents/ResizingFrameTest.java
Alexander Zvegintsev
azvegint at openjdk.org
Tue Aug 27 17:19:09 UTC 2024
On Mon, 26 Aug 2024 19:02:56 GMT, Alexander Zvegintsev <azvegint at openjdk.org> wrote:
> There are two mouse pointer locations on Wayland:
>
> `#1` Wayland compositor - can be controlled by a physical mouse device, or libei, this location is visible on a screen as a mouse cursor and is propagated to `#2`.
>
> `#2` Inside the XWayland server - most of the time this is the same as `#1`, unless we have changed it programmatically, e.g. by using the XTest extension protocol, but it does not move the visible mouse cursor in `#1`.
> Our tests in X11 compatibility mode using this approach(aka `java.awt.Robot#mouseMove`)
>
> This test moves the mouse cursor to a specific location over a window in `#2`, which most likely isn't the same as the visible cursor location in `#1`.
> If the window was moved/resized and placed under the visible cursor location, that cursor location is also set for `#2`, and from the test's perspective, the mouse has just been moved to a different location without the test expecting it, causing unexpected mouse enter/exit events.
>
> We can try to smooth this out with additional `robot.mouseMove` calls, but it looks like we are missing the point of the test.
> So for now it is better to skip the test on Wayland.
>
> Another way is to use libei to move the visible mouse cursor on the system ([JDK-8280983](https://bugs.openjdk.org/browse/JDK-8280983)), but its support is not yet widespread on supported systems.
>
> Testing looks good.
This pull request has now been integrated.
Changeset: b1b4cd42
Author: Alexander Zvegintsev <azvegint at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/b1b4cd429a4135840966975dd0c068fe428e2ee6
Stats: 15 lines in 2 files changed: 10 ins; 0 del; 5 mod
8332158: [XWayland] test/jdk/java/awt/Mouse/EnterExitEvents/ResizingFrameTest.java
Reviewed-by: serb, honkar
-------------
PR: https://git.openjdk.org/jdk/pull/20717
More information about the client-libs-dev
mailing list