RFR: 8357584: [XWayland] [OL10] Robot.mousePress() is delivered to wrong place
Lukasz Kostyra
lkostyra at openjdk.org
Wed Jun 25 12:24:34 UTC 2025
On Wed, 18 Jun 2025 15:33:45 GMT, Alexander Zvegintsev <azvegint at openjdk.org> wrote:
> This changeset introduces an adapted version of [the OpenJDK fix](https://github.com/openjdk/jdk/commit/2dfbf41d2a3dbcd44f9ed9a58a1b0932d7536977) for mouse and keyboard interactions with Robot.
> More info about the issue itself is available in the PR [description](https://github.com/openjdk/jdk/pull/25265#issue-3068640753)
>
> In short, the currently used XTest for keyboard and mouse interactions may not be suitable for automated testing at some point, as it may require user confirmation to control the mouse or keyboard from time to time.
>
> This fix adds support for the [Remote Desktop XDG portal](https://flatpak.github.io/xdg-desktop-portal/docs/doc-org.freedesktop.portal.RemoteDesktop.html).
> This allows us to control the keyboard and mouse with Robot on Wayland, even outside the XWayland server (e.g., clicking on window headers and Wayland native apps).
>
> ----
>
> * The remote desktop for Robot is enabled by default on GnomeShell 47+
> * It can be enabled manually by setting the `javafx.robot.screenshotMethod` system property to `dbusRemoteDesktop` (e.g. it works on Ubuntu 24.04 with GnomeShell 46)
> * The key handling might still have bugs.
> * The main goal is to add this new functionality. If there are small issues that can't be solved right away, I will prefer to fix them in follow up fixes.
Code looks good on first pass. I've given this quite a bit of testing both on Ubuntu 24.04 (Gnome 46) and Fedora 21 (Gnome 47) and the results are mostly similar. There's a small collection of tests failing on my machine, but that could be for any reason whatsoever. They also fail on master so I suspect it's not the fault of this change.
I see most checks relate to Gnome and its version - what would be the behavior if we ran the tests on a different desktop env like KDE?
-------------
PR Review: https://git.openjdk.org/jfx/pull/1834#pullrequestreview-2957939502
More information about the openjfx-dev
mailing list