RFR: 8357584: [XWayland] [OL10] Robot.mousePress() is delivered to wrong place

Lukasz Kostyra lkostyra at openjdk.org
Thu Jun 26 14:25:36 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.

modules/javafx.graphics/src/main/native-glass/gtk/screencast_pipewire.c line 42:

> 40:     } while (0)
> 41: 
> 42: struct pw_buffer *(*fp_pw_stream_dequeue_buffer)(struct pw_stream *stream);

These PipeWire declarations have been just moved here from the original header. Is this move necessary?

Also (a general thought towards past implementation, not just to your change) I think we should not define those manually at all. There are PipeWire headers defining those that we should include (and I believe we do already include some in `screencast_pipewire.h`

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1834#discussion_r2169191327


More information about the openjfx-dev mailing list